package com.distribute.framework.model;

import com.distribute.framework.core.web.helper.Utils;
import java.lang.reflect.Field;
import java.util.Date; 
import java.util.Map;
import java.util.HashMap;
import java.util.List;
import java.util.ArrayList;

import javax.annotation.Resource;

import com.distribute.framework.core.web.util.Page;
import com.distribute.framework.core.lang.*; 
import com.distribute.framework.core.web.helper.WebHelper.LzMap;
import com.distribute.framework.core.util.Function;
import com.distribute.framework.core.util.IbatisMap;
import com.distribute.framework.config.*;
import com.distribute.framework.plugin.*;

@namespace("setting/setting")
public @caption("业务参数") @database(DatabaseNames.distribute_sys) @source("distribute_sys") @table("parameter") class Parameter implements java.io.Serializable
{
	private static final long serialVersionUID = 1l;
		
	
		
	private @caption("编号") @column("id")    @primary  @notnull  @note("  ") Long id;// 主键 非空     
			
 			
 			
 		
	
		
	private @caption("所属品牌") @column("merchant")     @notnull  @relate("$merchant") @RelateClass(Merchant.class)  @note("  ") Long merchant;// 非空     
			
 	private transient Merchant $merchant;//关联对象[品牌信息]
 			
 			
 			
 		
	
		
	private @caption("普通间接佣金") @column("p_pt_jj")     @notnull  @note("  佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.") Double pPtJj;// 非空  佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.   
			
 			
 			
 		
	
		
	private @caption("普通直接佣金") @column("p_pt_zj")     @notnull  @note("  佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.") Double pPtZj;// 非空  佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.   
			
 			
 			
 		
	
		
	private @caption("代理间接佣金") @column("p_dl_jj")     @notnull  @note("  佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.") Double pDlJj;// 非空  佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.   
			
 			
 			
 		
	
		
	private @caption("代理直接佣金") @column("p_dl_zj")     @notnull  @note("  佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.") Double pDlZj;// 非空  佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.   
			
 			
 			
 		
	
		
	private @caption("配送商佣金") @column("p_ps_yj")     @notnull  @note("  佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.") Double pPsYj;// 非空  佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.   
			
 			
 			
 		
	
		
	private @caption("合伙人佣金") @column("p_hhr_yj")     @notnull  @note("  佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.") Double pHhrYj;// 非空  佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.   
			
 			
 			
 		
	
		
	private @caption("经销商佣金") @column("p_jxsh_yj")     @notnull  @note("  佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.") Double pJxshYj;// 非空  佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.   
			
 			
 			
 		
	
		
	private @caption("配送商服务条款") @column("ps_tk") @like  @hidden   @notnull  @note("  ") String psTk;// 非空     
			
 			
 			
 		
	
		
	private @caption("收益条款") @column("sy_tk") @like  @hidden   @notnull  @note("  ") String syTk;// 非空     
			
 			
 			
 		
	
		
	private @caption("充赠奖励政策") @column("p_chong_zc") @like  @hidden    @note("  ") String pChongZc;//     
			
 			
 			
 		
	
		
	private @caption("转发标题") @column("zf_bt")     @notnull  @note("  ") String zfBt;// 非空     
			
 			
 			
 		
	
		
	private @caption("转发封面") @column("zf_fm")     @notnull  @note("  ") String zfFm;// 非空     
			
 			
 			
 		
	
		
	private @caption("领红包页图片") @column("lq_hb_img")     @notnull  @note("  领红包页图片") String lqHbImg;// 非空  领红包页图片   
			
 			
 			
 		
	
		
	private @caption("有奖邀请图片") @column("yj_yq_img")     @notnull  @note("  首页底部有奖邀请页图片") String yjYqImg;// 非空  首页底部有奖邀请页图片   
			
 			
 			
 		
	
		
	private @caption("红包有效期") @column("validity")     @notnull  @note("  为正整数，已小时为单位  1代表1小时后红包过期") Integer validity;// 非空  为正整数，已小时为单位  1代表1小时后红包过期   
			
 			
 			
 		
	
		
	private @caption("红包分享标题") @column("red_title") @like    @notnull  @note("  ") String redTitle;// 非空     
			
 			
 			
 		
	
		
	private @caption("红包分享图") @column("red_img") @like    @notnull  @note("  ") String redImg;// 非空     
			
 			
 			
 		
	
		
	private @caption("满减配送费") @column("full_fee")     @notnull  @note("  ") Double fullFee;// 非空     
			
 			
 			
 		
	
		
	private @caption("首页轮播图") @column("home_rotary") @like    @notnull  @note("  建议最多上传3张图") String homeRotary;// 非空  建议最多上传3张图   
			
 			
 			
 		
	
		
	private @caption("优品列表轮播图") @column("list_map") @like    @notnull  @note("  建议最多上传3张图") String listMap;// 非空  建议最多上传3张图   
			
 			
 			
 		
	
		
	private @caption("代理申请图片") @column("agent_top_img")     @notnull  @note("  ") String agentTopImg;// 非空     
			
 			
 			
 		
	
		
	private @caption("推广海报") @column("hb")     @notnull  @note("  ") String hb;// 非空     
			
 			
 			
 		
	
		
	private @caption("修改时间") @column("update_time")     @notnull  @note("  ") Date updateTime;// 非空     
			
 			
 			
 		
	
		
	private @caption("添加时间") @column("add_time")     @notnull  @note("  ") Date addTime;// 非空     
			
 			
 			
 		
	
		
	private @caption("状态") @column("status")     @notnull  @note(" 1:正常 0:无效  ") Short status;// 非空 1:正常 0:无效     
			
 			
 			
 		
	
	 
	//默认构造函数
	public Parameter(){ 
	
	}
	
	//主键构造函数
	public Parameter(Long id){
		this.id = id;
	}
	
	/**所有字段构造函数 
	 Parameter(
	 	Utils.getLong("merchant")//所属品牌 [非空]
	 	,Utils.getDouble("pPtJj")//普通间接佣金 [非空]
	 	,Utils.getDouble("pPtZj")//普通直接佣金 [非空]
	 	,Utils.getDouble("pDlJj")//代理间接佣金 [非空]
	 	,Utils.getDouble("pDlZj")//代理直接佣金 [非空]
	 	,Utils.getDouble("pPsYj")//配送商佣金 [非空]
	 	,Utils.getDouble("pHhrYj")//合伙人佣金 [非空]
	 	,Utils.getDouble("pJxshYj")//经销商佣金 [非空]
	 	,Utils.getString("psTk")//配送商服务条款 [非空]
	 	,Utils.getString("syTk")//收益条款 [非空]
	 	,Utils.getString("pChongZc")//充赠奖励政策
	 	,Utils.getString("zfBt")//转发标题 [非空]
	 	,Utils.getString("zfFm")//转发封面 [非空]
	 	,Utils.getString("lqHbImg")//领红包页图片 [非空]
	 	,Utils.getString("yjYqImg")//有奖邀请图片 [非空]
	 	,Utils.getInteger("validity")//红包有效期 [非空]
	 	,Utils.getString("redTitle")//红包分享标题 [非空]
	 	,Utils.getString("redImg")//红包分享图 [非空]
	 	,Utils.getDouble("fullFee")//满减配送费 [非空]
	 	,Utils.getString("homeRotary")//首页轮播图 [非空]
	 	,Utils.getString("listMap")//优品列表轮播图 [非空]
	 	,Utils.getString("agentTopImg")//代理申请图片 [非空]
	 	,Utils.getString("hb")//推广海报 [非空]
	 	,Utils.getDate("updateTime")//修改时间 [非空]
	 	,Utils.getDate("addTime")//添加时间 [非空]
	 	,Utils.getShort("status")//状态 [非空]
	 )
	**/
	public Parameter(Long merchant,Double pPtJj,Double pPtZj,Double pDlJj,Double pDlZj,Double pPsYj,Double pHhrYj,Double pJxshYj,String psTk,String syTk,String pChongZc,String zfBt,String zfFm,String lqHbImg,String yjYqImg,Integer validity,String redTitle,String redImg,Double fullFee,String homeRotary,String listMap,String agentTopImg,String hb,Date updateTime,Date addTime,Short status){
		
			
			
		this.merchant=merchant;
		
			
		this.pPtJj=pPtJj;
		
			
		this.pPtZj=pPtZj;
		
			
		this.pDlJj=pDlJj;
		
			
		this.pDlZj=pDlZj;
		
			
		this.pPsYj=pPsYj;
		
			
		this.pHhrYj=pHhrYj;
		
			
		this.pJxshYj=pJxshYj;
		
			
		this.psTk=psTk;
		
			
		this.syTk=syTk;
		
			
		this.pChongZc=pChongZc;
		
			
		this.zfBt=zfBt;
		
			
		this.zfFm=zfFm;
		
			
		this.lqHbImg=lqHbImg;
		
			
		this.yjYqImg=yjYqImg;
		
			
		this.validity=validity;
		
			
		this.redTitle=redTitle;
		
			
		this.redImg=redImg;
		
			
		this.fullFee=fullFee;
		
			
		this.homeRotary=homeRotary;
		
			
		this.listMap=listMap;
		
			
		this.agentTopImg=agentTopImg;
		
			
		this.hb=hb;
		
			
		this.updateTime=updateTime;
		
			
		this.addTime=addTime;
		
			
		this.status=status;
		
	}
	
	//设置非空字段
	public Parameter setNotNull(Long merchant,Double pPtJj,Double pPtZj,Double pDlJj,Double pDlZj,Double pPsYj,Double pHhrYj,Double pJxshYj,String psTk,String syTk,String zfBt,String zfFm,String lqHbImg,String yjYqImg,Integer validity,String redTitle,String redImg,Double fullFee,String homeRotary,String listMap,String agentTopImg,String hb,Date updateTime,Date addTime,Short status){
		
			
			
		this.merchant=merchant;
		
			
		this.pPtJj=pPtJj;
		
			
		this.pPtZj=pPtZj;
		
			
		this.pDlJj=pDlJj;
		
			
		this.pDlZj=pDlZj;
		
			
		this.pPsYj=pPsYj;
		
			
		this.pHhrYj=pHhrYj;
		
			
		this.pJxshYj=pJxshYj;
		
			
		this.psTk=psTk;
		
			
		this.syTk=syTk;
		
			
			
		this.zfBt=zfBt;
		
			
		this.zfFm=zfFm;
		
			
		this.lqHbImg=lqHbImg;
		
			
		this.yjYqImg=yjYqImg;
		
			
		this.validity=validity;
		
			
		this.redTitle=redTitle;
		
			
		this.redImg=redImg;
		
			
		this.fullFee=fullFee;
		
			
		this.homeRotary=homeRotary;
		
			
		this.listMap=listMap;
		
			
		this.agentTopImg=agentTopImg;
		
			
		this.hb=hb;
		
			
		this.updateTime=updateTime;
		
			
		this.addTime=addTime;
		
			
		this.status=status;
		
		return this;
	}
	
	
		
	/** 编号 [非空]       **/
	public Parameter id(Long id){
		this.id = id;
		this.setSeted(F.id);
		return this;
	}
	
		
	/** 所属品牌 [非空] [Merchant]      **/
	public Parameter merchant(Long merchant){
		this.merchant = merchant;
		this.setSeted(F.merchant);
		return this;
	}
	
		
	/** 普通间接佣金 [非空]    佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.   **/
	public Parameter pPtJj(Double pPtJj){
		this.pPtJj = pPtJj;
		this.setSeted(F.pPtJj);
		return this;
	}
	
		
	/** 普通直接佣金 [非空]    佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.   **/
	public Parameter pPtZj(Double pPtZj){
		this.pPtZj = pPtZj;
		this.setSeted(F.pPtZj);
		return this;
	}
	
		
	/** 代理间接佣金 [非空]    佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.   **/
	public Parameter pDlJj(Double pDlJj){
		this.pDlJj = pDlJj;
		this.setSeted(F.pDlJj);
		return this;
	}
	
		
	/** 代理直接佣金 [非空]    佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.   **/
	public Parameter pDlZj(Double pDlZj){
		this.pDlZj = pDlZj;
		this.setSeted(F.pDlZj);
		return this;
	}
	
		
	/** 配送商佣金 [非空]    佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.   **/
	public Parameter pPsYj(Double pPsYj){
		this.pPsYj = pPsYj;
		this.setSeted(F.pPsYj);
		return this;
	}
	
		
	/** 合伙人佣金 [非空]    佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.   **/
	public Parameter pHhrYj(Double pHhrYj){
		this.pHhrYj = pHhrYj;
		this.setSeted(F.pHhrYj);
		return this;
	}
	
		
	/** 经销商佣金 [非空]    佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.   **/
	public Parameter pJxshYj(Double pJxshYj){
		this.pJxshYj = pJxshYj;
		this.setSeted(F.pJxshYj);
		return this;
	}
	
		
	/** 配送商服务条款 [非空]       **/
	public Parameter psTk(String psTk){
		this.psTk = psTk;
		this.setSeted(F.psTk);
		return this;
	}
	
		
	/** 收益条款 [非空]       **/
	public Parameter syTk(String syTk){
		this.syTk = syTk;
		this.setSeted(F.syTk);
		return this;
	}
	
		
	/** 充赠奖励政策        **/
	public Parameter pChongZc(String pChongZc){
		this.pChongZc = pChongZc;
		this.setSeted(F.pChongZc);
		return this;
	}
	
		
	/** 转发标题 [非空]       **/
	public Parameter zfBt(String zfBt){
		this.zfBt = zfBt;
		this.setSeted(F.zfBt);
		return this;
	}
	
		
	/** 转发封面 [非空]       **/
	public Parameter zfFm(String zfFm){
		this.zfFm = zfFm;
		this.setSeted(F.zfFm);
		return this;
	}
	
		
	/** 领红包页图片 [非空]    领红包页图片   **/
	public Parameter lqHbImg(String lqHbImg){
		this.lqHbImg = lqHbImg;
		this.setSeted(F.lqHbImg);
		return this;
	}
	
		
	/** 有奖邀请图片 [非空]    首页底部有奖邀请页图片   **/
	public Parameter yjYqImg(String yjYqImg){
		this.yjYqImg = yjYqImg;
		this.setSeted(F.yjYqImg);
		return this;
	}
	
		
	/** 红包有效期 [非空]    为正整数，已小时为单位  1代表1小时后红包过期   **/
	public Parameter validity(Integer validity){
		this.validity = validity;
		this.setSeted(F.validity);
		return this;
	}
	
		
	/** 红包分享标题 [非空]       **/
	public Parameter redTitle(String redTitle){
		this.redTitle = redTitle;
		this.setSeted(F.redTitle);
		return this;
	}
	
		
	/** 红包分享图 [非空]       **/
	public Parameter redImg(String redImg){
		this.redImg = redImg;
		this.setSeted(F.redImg);
		return this;
	}
	
		
	/** 满减配送费 [非空]       **/
	public Parameter fullFee(Double fullFee){
		this.fullFee = fullFee;
		this.setSeted(F.fullFee);
		return this;
	}
	
		
	/** 首页轮播图 [非空]    建议最多上传3张图   **/
	public Parameter homeRotary(String homeRotary){
		this.homeRotary = homeRotary;
		this.setSeted(F.homeRotary);
		return this;
	}
	
		
	/** 优品列表轮播图 [非空]    建议最多上传3张图   **/
	public Parameter listMap(String listMap){
		this.listMap = listMap;
		this.setSeted(F.listMap);
		return this;
	}
	
		
	/** 代理申请图片 [非空]       **/
	public Parameter agentTopImg(String agentTopImg){
		this.agentTopImg = agentTopImg;
		this.setSeted(F.agentTopImg);
		return this;
	}
	
		
	/** 推广海报 [非空]       **/
	public Parameter hb(String hb){
		this.hb = hb;
		this.setSeted(F.hb);
		return this;
	}
	
		
	/** 修改时间 [非空]       **/
	public Parameter updateTime(Date updateTime){
		this.updateTime = updateTime;
		this.setSeted(F.updateTime);
		return this;
	}
	
		
	/** 添加时间 [非空]       **/
	public Parameter addTime(Date addTime){
		this.addTime = addTime;
		this.setSeted(F.addTime);
		return this;
	}
	
		
	/** 状态 [非空]   1:正常 0:无效     **/
	public Parameter status(Short status){
		this.status = status;
		this.setSeted(F.status);
		return this;
	}
	
	
	
	/**
	* 克隆对象
	**/
	public Parameter clone(){
		Parameter clone = new Parameter();
		
			
			
		clone.merchant=this.merchant;
		
			
		clone.pPtJj=this.pPtJj;
		
			
		clone.pPtZj=this.pPtZj;
		
			
		clone.pDlJj=this.pDlJj;
		
			
		clone.pDlZj=this.pDlZj;
		
			
		clone.pPsYj=this.pPsYj;
		
			
		clone.pHhrYj=this.pHhrYj;
		
			
		clone.pJxshYj=this.pJxshYj;
		
			
		clone.psTk=this.psTk;
		
			
		clone.syTk=this.syTk;
		
			
		clone.pChongZc=this.pChongZc;
		
			
		clone.zfBt=this.zfBt;
		
			
		clone.zfFm=this.zfFm;
		
			
		clone.lqHbImg=this.lqHbImg;
		
			
		clone.yjYqImg=this.yjYqImg;
		
			
		clone.validity=this.validity;
		
			
		clone.redTitle=this.redTitle;
		
			
		clone.redImg=this.redImg;
		
			
		clone.fullFee=this.fullFee;
		
			
		clone.homeRotary=this.homeRotary;
		
			
		clone.listMap=this.listMap;
		
			
		clone.agentTopImg=this.agentTopImg;
		
			
		clone.hb=this.hb;
		
			
		clone.updateTime=this.updateTime;
		
			
		clone.addTime=this.addTime;
		
			
		clone.status=this.status;
		
		return clone;
	}
	
	
	
	/**
	* 清除缓存
	**/
	public void clear(){
		Cache.clearObject(Parameter.M.class);
		Cache.clearValue(Parameter.M.class);
		Cache.deleteObject(Parameter.class, this.getId());
	}
	
	/**
	* 清除缓存
	**/
	public static void clear(Long id){
		Cache.clearObject(Parameter.M.class);
		Cache.clearValue(Parameter.M.class);
		Cache.deleteObject(Parameter.class, id);
	}
	
	
	
	/**
	 * 根据ID取业务参数
	 * @param id
	 * @return
	 */
	public static @api Parameter get(Long id){		
		return getParameterById(id);
	}
	
	
	
	/**
	 * 获取所有业务参数
	 * @return
	 */
	public static @api List<Parameter> list(Map params,Integer size){
		return getParameterList(params,size);
	}
	/**
	 * 获取业务参数分页
	 * @return
	 */
	public static @api Page<Parameter> page(Integer page,Integer size,Map params){
		return getParameterPage(page, size , params);
	}
	
	
	/**
	 * 根据查询条件取业务参数
	 * @param params
	 * @return
	 */
	public static @api Parameter Get(Map params){
		return getParameter(params);
	}
	/**
	 * 获取业务参数数
	 * @return
	 */
	public static @api Long count(Map params){
		return getParameterCount(params);
	}
	/**
	 * 获取业务参数数
	 * @return
	 */
	public static @api <T> T eval(String eval,Map params){
		return getParameterEval(eval,params);
	}
	
	
	/**
	 * 获取业务参数图表统计数据
	 * @param params 查询条件
	 * @param sumKey 统计的字段
	 * @param groupKey 1:按年， 2：按月， 3：按周， 4：按日， 5：按小时， 6：月分， 7：日分， 8：点分
	 * @return
	 */
	public static @api List<Map> stats(Map params,C sumKey,C groupKey){
		return getParameterStats(params,sumKey,groupKey,-1);
	}
	/**
	 * 获取业务参数图表统计数据
	 * @param params 查询条件
	 * @param sumKey 统计的字段
	 * @param groupKey 分组的字段
	 * @param dateType 1:按年， 2：按月， 3：按周， 4：按日， 5：按小时， 6：月分， 7：日分， 8：点分
	 * @return
	 */
	public static @api List<Map> stats(Map params,C sumKey,C groupKey,int dateType){
		return getParameterStats(params,sumKey,groupKey,dateType);
	}
	
	
	/**
	 * 根据ID取业务参数
	 * @param id
	 * @return
	 */
	public static @api Parameter getParameterById(Long id){		
		return getParameterDao().getParameterById(id);
	}
	
	
	
	
	/**
	 * 根据ID取业务参数的标识键值
	 * @param id
	 * @return
	 */
	public static @api String getKeyValue(Object key){
		Long id = Utils.parseLong(key);	
		if(id==null || id.longValue()==0 ){
			
			return null;
			
		}
		String value = null;
		
		value = Cache.getValue(Parameter.class, id);
				
		if(value==null){
			Parameter parameter = get(id);
			if(parameter!=null){
				String strValue = parameter.getId$();
				
				
				Cache.setValue(Parameter.class, id ,strValue);
				
				value = strValue;
			}else{
				
				Cache.setValue(Parameter.class, id ,"{"+id+"}",30);
				
				value = "{"+id+"}";
			}
		}
		
		/************LAZY3Q_ID_KEYVALUE************/
		/************LAZY3Q_ID_KEYVALUE************/
		return value;
	}	
	
	
	/**
	 * 获取当前对象的键值
	 * @return
	 */
	public String getKeyValue(){
		
		/************LAZY3Q_CODE_KEYVALUE************/
		/************LAZY3Q_CODE_KEYVALUE************/
		String keyValue = this.getId$();
		
		return keyValue;
	}
	
	
	/**
	 * 根据关键字精确查询业务参数对象
	 * @return
	 */
	public static @api Parameter find(String key){
		if(Utils.empty(key))return null;
		Map params = new HashMap();
		if(key.toLowerCase().startsWith("id:"))//如果查询条件以id:开头，则按ID查询
			params.put("id", key.toLowerCase().replaceFirst("id:", ""));					
		else{//按标识查询，精确查询
			String strDefinex = "";
			
			strDefinex="(2=1 "+strDefinex+")";
			params.put("definex",strDefinex);
		}
		
		/************LAZY3Q_CODE_FIND************/
		/************LAZY3Q_CODE_FIND************/
		return Parameter.getParameter(params);
	}
	
	
	/**
	 * 根据关键字查询业务参数
	 * @return
	 */
	public static @api List<Map> query(String key,int size,Map params,Boolean bObject){
		if(Utils.empty((String)params.get("asc")) && Utils.empty((String)params.get("desc")))//如果未传入排序字段
			params.put("desc","id");//那么，默认以主键降序，传给Dao层
		String strTerm=key;		
		if(!Utils.empty(strTerm)){
			if(strTerm.toLowerCase().startsWith("id:"))//如果查询条件以id:开头，则按ID查询
				params.put("id", strTerm.toLowerCase().replaceFirst("id:", ""));					
			else//按标识查询，模糊查询请带%
			{
				String strDefinex = "";
				
				strDefinex="(2=1 "+strDefinex+")";
				params.put("definex",strDefinex);
			}
		}
		
		
		/************LAZY3Q_CODE_QUERY************/
		/************LAZY3Q_CODE_QUERY************/
			
		List<Parameter> list = page(0,size,params).getResult();
		
		/**
		* OK!取到数据拼成放入Map中，[{value,text,object:{...}},...]
		* value:数据ID，text:数据标识,object,整个对象
		**/
		List<Map> result = new java.util.ArrayList();
		for(Parameter parameter:list){
			Map map = new HashMap();
			map.put("key",parameter.getId().toString());
			map.put("value", Utils.js(parameter.getKeyValue()));
			if(bObject==true)
				map.put("object",parameter);
			result.add(map);
		}
		
		
		/************LAZY3Q_AFTER_QUERY************/
		/************LAZY3Q_AFTER_QUERY************/
		
		return result;
	}
	
	
	
	/**
	 * 获取所有业务参数
	 * @return
	 */
	public static @api List<Parameter> getParameterList(Map params,Integer size){
		return getParameterDao().getParameterList(params,0,size);
	}
	
	/**
	 * 获取业务参数分页
	 * @return
	 */
	public static @api Page<Parameter> getParameterPage(Integer page,Integer size,Map params){
		if(page==null)page=0;
		if(size==null)size=20;
		return getParameterDao().getParameterPage(page, size , params);
	}
	
	/**
	 * 根据查询条件取业务参数
	 * @param params
	 * @return
	 */
	public static @api Parameter getParameter(Map params){
		return getParameterDao().getParameter(params);
	}
	
	/**
	 * 保存一个业务参数
	 * @param parameter
	 * @return
	 */
	public static @api Parameter saveParameter(Parameter parameter){
		return getParameterDao().saveParameter(parameter);
	}
	
	/**
	 * 根据条件更新业务参数
	 * @param values
	 * @param params
	 */
	public static @api int updateParameterByConfirm(Map values, Map params){
		return getParameterDao().updateParameterByConfirm(values,params);
	}
	
	/**
	 * 修改一个业务参数
	 * @param parameter
	 * @return
	 */
	public static @api int updateParameter(Parameter parameter){
		return getParameterDao().updateParameter(parameter);
	}
	
	/**
	 * 更新业务参数非空字段
	 * @param parameter
	 */
	public static @api int updateParameter$NotNull(Parameter parameter){
		return getParameterDao().updateParameter$NotNull(parameter);
	}
	
	/**
	 * 获取业务参数数
	 * @return
	 */
	public static @api Long getParameterCount(Map params){
		return getParameterDao().getParameterCount(params);
	}
		
		
	/**
	 * 获取业务参数自定义求和表达式,比如求和:eval="sum(id)"
	 * @return
	 */	
	public static @api <T> T getParameterEval(String eval,Map params){
		return getParameterDao().getParameterEval(eval,params);
	}
	
	
	/**
	 * 获取业务参数图表统计数据
	 * @param params 查询条件
	 * @param sumKey 统计的字段
	 * @param groupKey 分组的字段
	 * @param dateType 1:按年， 2：按月， 3：按周， 4：按日， 5：按小时， 6：月分， 7：日分， 8：点分
	 * @return
	 */
	public static @api List<Map> getParameterStats(Map params,C sumKey,C groupKey,int dateType){
		//TODO:图表统计功能未实现
		
		Map<String,Object> groups=new HashMap();//要分组的字段
		Map<String,Object> sums=new HashMap();//要统计的字段
		
		String[][] dateFormats=new String[][]{
				null,
				new String[]{"%Y","yyyy年","Y"},
				new String[]{"%Y-%m","yyyy年MM月","M"},
				new String[]{"%Y%U","yyyy年第ww周","W"},
				new String[]{"%Y-%m-%d","yyyy年MM月dd日","D"},
				new String[]{"%Y-%m-%d %H","yyyy年MM月dd日 HH点","H"},
				new String[]{"%m","MM月"},
				new String[]{"%d","dd号"},
				new String[]{"%H","HH点"} 
		};
		
		//获取要分组的字段，放入Map中
		if(dateType>0){
			groups.put(groupKey.toString(),"DATE_FORMAT({key},'"+dateFormats[dateType][0]+"')");
		}else{
			groups.put(groupKey.toString(),"{key}");
		}
		if(dateType<6 && dateType>0){ 
			params.put("asc", groupKey.toString()); 
			if(params.get(groupKey.name()+"Start")==null){
				params.put(groupKey.name()+"Start", Utils.date(new Date(), -24, dateFormats[dateType][2]));
			}
		}
		
		
		//获取要统计的字段，放入Map中
		if(sumKey.toString().equals("count")){
			sums.put(sumKey.toString(),"count(*)");
		}else{
			sums.put(sumKey.toString(),"sum({key})");
		}
		
		List<Map> list = getParameterDao().getParameterStats(params,groups,sums);
		
		List<Map> result = new ArrayList();
		for(Map m:list){
			Map map = new HashMap();
			Object value = m.get(sumKey.toString());
			Object name = null;
			Object groupValue = m.get(groupKey.toString());
			if(dateType>0){
				name = Utils.date(Utils.parseDate(groupValue), dateFormats[dateType][1]);
			}else{
				try{
					java.lang.reflect.Method method = Parameter.class.getMethod("get"+Utils.ForMat(groupKey.toString())+"$");
					method.setAccessible(true);
					name = method.invoke(Parameter.fromMap(m));
				}catch(Exception ex){
					ex.printStackTrace();
				}
			}
			map.put("name", name);
			map.put("value", value);
			result.add(map);
		}
		return result;
	}
	
	
	/**
	 * 根据条件更新数据
	 * @param set
	 * @param where
	 */
	public static int updateParameter(Map set,Map where){
		if(set.isEmpty())throw new RuntimeException("set为空");
		if(where.isEmpty())throw new RuntimeException("where为空");
		where.put("confirm", "1");
		return getParameterDao().updateParameterByConfirm(set, where);
	}
	
	
	/**
	 * 根据条件更新数据
	 * @param set
	 * @param where
	 */
	public static void deleteParameter(Map where){
		if(where.isEmpty())throw new RuntimeException("where为空");
		where.put("confirm", "1");
		getParameterDao().deleteParameterByConfirm(where);
	}
	
	/**
	 * 根据条件更新数据
	 * @param set
	 * @param where
	 */
	public static void delete(Long id){
		if(id==null)throw new RuntimeException("id为空");
		
		getParameterDao().removeParameterById(id);
		
	}
	
	
	/**
	 * 保存业务参数对象
	 * @param params
	 * @return
	 */
	public Parameter save(){
		if(this.getId()!=null)
			getParameterDao().updateParameter(this);
		else
			return getParameterDao().saveParameter(this);
		return this;
	}
	
	
	/**
	 * 更新业务参数对象的非空字段,注意跟Service里面的update不一样哦
	 * @param params
	 * @return
	 */
	public int update(){
		return getParameterDao().updateParameter$NotNull(this);
	}
	
	
	/**
	 * 删除
	 * @param params
	 * @return
	 */
	public void delete(){
		
		if(Utils.equals(Utils.config("logic_delete"),"true"))
			getParameterDao().removeParameterById(this.getId());
		else
		
			getParameterDao().deleteParameterById(this.getId());
	}
	
	/**
	 * 执行事务
	 * @param function
	 */
	public static <T> T execute(Function function){
		return getParameterDao().executeTransaction(function);
	}

	
	
	/*******************************编号**********************************/	
	/**
	* 编号 [非空]      
	**/
	public Long getId(){
		
		if(this.id!=null){
			return this.id;
		}
		
		return this.id;
	}
	/**
	* 获取编号格式化(toString)
	**/
	public String getId$(){
		String strValue="";
	
	
		 strValue=Utils.string(this.getId());
	 
	 	 return strValue;
	}
	/**
	* 根据编号反格式化
	**/
	public void setId$(String strValue){
		if(Utils.empty(strValue)){
			this.id=null;
			return;
		}
	
	
	 	this.id=Utils.parseLong(strValue);
	 
	}
	
	/**
	* 编号 [非空]      
	**/
	public void setId(Long id){
		this.id = id;
		
		this.setSeted(F.id);
		
	}
	
	
	
	
	
	
	
	
	
	
 	
 	
	
	
	
	
	
 	
 	
 	
	
	
	/*******************************所属品牌**********************************/	
	/**
	* 所属品牌 [非空] [Merchant]     
	**/
	public Long getMerchant(){
		
		if(this.merchant!=null){
			return this.merchant;
		}
		
		return this.merchant;
	}
	/**
	* 获取所属品牌格式化(toString)
	**/
	public String getMerchant$(){
		String strValue="";
	
	
		 
		if(this.getMerchant()!=null){
			
				strValue+=Utils.string(Merchant.getKeyValue(this.getMerchant()));
			
		}			
		 
	 
	 	 return strValue;
	}
	/**
	* 根据所属品牌反格式化
	**/
	public void setMerchant$(String strValue){
		if(Utils.empty(strValue)){
			this.merchant=null;
			return;
		}
	
	
		 
		Merchant item = Merchant.find(strValue);
		if(item!=null){
			
			this.merchant = Utils.parseLong(item.getId());
			
		}
		 
	 
	}
	
	/**
	* 所属品牌 [非空] [Merchant]     
	**/
	public void setMerchant(Long merchant){
		this.merchant = merchant;
		
		this.setSeted(F.merchant);
		
	}
	
	
		 
	
	
	
	
	
	
	
	
	
 	
 	
	
	
	
	
	
 	
 		
	/**
	* 获取关联对象[品牌信息]
	**/	 			
 	public Merchant get$merchant(){
 		if(this.$merchant!=null)
 			return this.$merchant;
 		com.distribute.framework.model.Merchant merchant = null;
		if(this.getMerchant()!=null){
		
 			merchant = Merchant.get(this.getMerchant());
 		
 		}
 		return merchant;
	}
	
 	
	
	
	/*******************************普通间接佣金**********************************/	
	/**
	* 普通间接佣金 [非空]    佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.  
	**/
	public Double getpPtJj(){
		
		if(this.pPtJj!=null){
			return this.pPtJj;
		}
		
		return this.pPtJj;
	}
	/**
	* 获取普通间接佣金格式化(toString)
	**/
	public String getpPtJj$(){
		String strValue="";
	
	
			
		 strValue=Utils.string(this.getpPtJj());	
			
	 
	 	 return strValue;
	}
	/**
	* 根据普通间接佣金反格式化
	**/
	public void setpPtJj$(String strValue){
		if(Utils.empty(strValue)){
			this.pPtJj=null;
			return;
		}
	
	
	 	this.pPtJj=Utils.parseDouble(strValue);
	 
	}
	
	/**
	* 普通间接佣金 [非空]    佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.  
	**/
	public void setpPtJj(Double pPtJj){
		this.pPtJj = pPtJj;
		
		this.setSeted(F.pPtJj);
		
	}
	
	
	
	
	
	
	
	
	
	
 	
 	
	
	
	
	
	
 	
 	
 	
	
	
	/*******************************普通直接佣金**********************************/	
	/**
	* 普通直接佣金 [非空]    佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.  
	**/
	public Double getpPtZj(){
		
		if(this.pPtZj!=null){
			return this.pPtZj;
		}
		
		return this.pPtZj;
	}
	/**
	* 获取普通直接佣金格式化(toString)
	**/
	public String getpPtZj$(){
		String strValue="";
	
	
			
		 strValue=Utils.string(this.getpPtZj());	
			
	 
	 	 return strValue;
	}
	/**
	* 根据普通直接佣金反格式化
	**/
	public void setpPtZj$(String strValue){
		if(Utils.empty(strValue)){
			this.pPtZj=null;
			return;
		}
	
	
	 	this.pPtZj=Utils.parseDouble(strValue);
	 
	}
	
	/**
	* 普通直接佣金 [非空]    佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.  
	**/
	public void setpPtZj(Double pPtZj){
		this.pPtZj = pPtZj;
		
		this.setSeted(F.pPtZj);
		
	}
	
	
	
	
	
	
	
	
	
	
 	
 	
	
	
	
	
	
 	
 	
 	
	
	
	/*******************************代理间接佣金**********************************/	
	/**
	* 代理间接佣金 [非空]    佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.  
	**/
	public Double getpDlJj(){
		
		if(this.pDlJj!=null){
			return this.pDlJj;
		}
		
		return this.pDlJj;
	}
	/**
	* 获取代理间接佣金格式化(toString)
	**/
	public String getpDlJj$(){
		String strValue="";
	
	
			
		 strValue=Utils.string(this.getpDlJj());	
			
	 
	 	 return strValue;
	}
	/**
	* 根据代理间接佣金反格式化
	**/
	public void setpDlJj$(String strValue){
		if(Utils.empty(strValue)){
			this.pDlJj=null;
			return;
		}
	
	
	 	this.pDlJj=Utils.parseDouble(strValue);
	 
	}
	
	/**
	* 代理间接佣金 [非空]    佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.  
	**/
	public void setpDlJj(Double pDlJj){
		this.pDlJj = pDlJj;
		
		this.setSeted(F.pDlJj);
		
	}
	
	
	
	
	
	
	
	
	
	
 	
 	
	
	
	
	
	
 	
 	
 	
	
	
	/*******************************代理直接佣金**********************************/	
	/**
	* 代理直接佣金 [非空]    佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.  
	**/
	public Double getpDlZj(){
		
		if(this.pDlZj!=null){
			return this.pDlZj;
		}
		
		return this.pDlZj;
	}
	/**
	* 获取代理直接佣金格式化(toString)
	**/
	public String getpDlZj$(){
		String strValue="";
	
	
			
		 strValue=Utils.string(this.getpDlZj());	
			
	 
	 	 return strValue;
	}
	/**
	* 根据代理直接佣金反格式化
	**/
	public void setpDlZj$(String strValue){
		if(Utils.empty(strValue)){
			this.pDlZj=null;
			return;
		}
	
	
	 	this.pDlZj=Utils.parseDouble(strValue);
	 
	}
	
	/**
	* 代理直接佣金 [非空]    佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.  
	**/
	public void setpDlZj(Double pDlZj){
		this.pDlZj = pDlZj;
		
		this.setSeted(F.pDlZj);
		
	}
	
	
	
	
	
	
	
	
	
	
 	
 	
	
	
	
	
	
 	
 	
 	
	
	
	/*******************************配送商佣金**********************************/	
	/**
	* 配送商佣金 [非空]    佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.  
	**/
	public Double getpPsYj(){
		
		if(this.pPsYj!=null){
			return this.pPsYj;
		}
		
		return this.pPsYj;
	}
	/**
	* 获取配送商佣金格式化(toString)
	**/
	public String getpPsYj$(){
		String strValue="";
	
	
			
		 strValue=Utils.string(this.getpPsYj());	
			
	 
	 	 return strValue;
	}
	/**
	* 根据配送商佣金反格式化
	**/
	public void setpPsYj$(String strValue){
		if(Utils.empty(strValue)){
			this.pPsYj=null;
			return;
		}
	
	
	 	this.pPsYj=Utils.parseDouble(strValue);
	 
	}
	
	/**
	* 配送商佣金 [非空]    佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.  
	**/
	public void setpPsYj(Double pPsYj){
		this.pPsYj = pPsYj;
		
		this.setSeted(F.pPsYj);
		
	}
	
	
	
	
	
	
	
	
	
	
 	
 	
	
	
	
	
	
 	
 	
 	
	
	
	/*******************************合伙人佣金**********************************/	
	/**
	* 合伙人佣金 [非空]    佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.  
	**/
	public Double getpHhrYj(){
		
		if(this.pHhrYj!=null){
			return this.pHhrYj;
		}
		
		return this.pHhrYj;
	}
	/**
	* 获取合伙人佣金格式化(toString)
	**/
	public String getpHhrYj$(){
		String strValue="";
	
	
			
		 strValue=Utils.string(this.getpHhrYj());	
			
	 
	 	 return strValue;
	}
	/**
	* 根据合伙人佣金反格式化
	**/
	public void setpHhrYj$(String strValue){
		if(Utils.empty(strValue)){
			this.pHhrYj=null;
			return;
		}
	
	
	 	this.pHhrYj=Utils.parseDouble(strValue);
	 
	}
	
	/**
	* 合伙人佣金 [非空]    佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.  
	**/
	public void setpHhrYj(Double pHhrYj){
		this.pHhrYj = pHhrYj;
		
		this.setSeted(F.pHhrYj);
		
	}
	
	
	
	
	
	
	
	
	
	
 	
 	
	
	
	
	
	
 	
 	
 	
	
	
	/*******************************经销商佣金**********************************/	
	/**
	* 经销商佣金 [非空]    佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.  
	**/
	public Double getpJxshYj(){
		
		if(this.pJxshYj!=null){
			return this.pJxshYj;
		}
		
		return this.pJxshYj;
	}
	/**
	* 获取经销商佣金格式化(toString)
	**/
	public String getpJxshYj$(){
		String strValue="";
	
	
			
		 strValue=Utils.string(this.getpJxshYj());	
			
	 
	 	 return strValue;
	}
	/**
	* 根据经销商佣金反格式化
	**/
	public void setpJxshYj$(String strValue){
		if(Utils.empty(strValue)){
			this.pJxshYj=null;
			return;
		}
	
	
	 	this.pJxshYj=Utils.parseDouble(strValue);
	 
	}
	
	/**
	* 经销商佣金 [非空]    佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.  
	**/
	public void setpJxshYj(Double pJxshYj){
		this.pJxshYj = pJxshYj;
		
		this.setSeted(F.pJxshYj);
		
	}
	
	
	
	
	
	
	
	
	
	
 	
 	
	
	
	
	
	
 	
 	
 	
	
	
	/*******************************配送商服务条款**********************************/	
	/**
	* 配送商服务条款 [非空]      
	**/
	public String getPsTk(){
		
		if(this.psTk!=null){
			return this.psTk;
		}
		
		return this.psTk;
	}
	/**
	* 获取配送商服务条款格式化(toString)
	**/
	public String getPsTk$(){
		String strValue="";
	
	
		 strValue=Utils.string(this.getPsTk());
	 
	 	 return strValue;
	}
	/**
	* 根据配送商服务条款反格式化
	**/
	public void setPsTk$(String strValue){
		if(Utils.empty(strValue)){
			this.psTk=null;
			return;
		}
	
	
		this.psTk=strValue;
	 
	}
	
	/**
	* 配送商服务条款 [非空]      
	**/
	public void setPsTk(String psTk){
		this.psTk = psTk;
		
		this.setSeted(F.psTk);
		
	}
	
	
	
	
	
	
	
	
	
	
 	
 	
	
	
	
	
	
 	
 	
 	
	
	
	/*******************************收益条款**********************************/	
	/**
	* 收益条款 [非空]      
	**/
	public String getSyTk(){
		
		if(this.syTk!=null){
			return this.syTk;
		}
		
		return this.syTk;
	}
	/**
	* 获取收益条款格式化(toString)
	**/
	public String getSyTk$(){
		String strValue="";
	
	
		 strValue=Utils.string(this.getSyTk());
	 
	 	 return strValue;
	}
	/**
	* 根据收益条款反格式化
	**/
	public void setSyTk$(String strValue){
		if(Utils.empty(strValue)){
			this.syTk=null;
			return;
		}
	
	
		this.syTk=strValue;
	 
	}
	
	/**
	* 收益条款 [非空]      
	**/
	public void setSyTk(String syTk){
		this.syTk = syTk;
		
		this.setSeted(F.syTk);
		
	}
	
	
	
	
	
	
	
	
	
	
 	
 	
	
	
	
	
	
 	
 	
 	
	
	
	/*******************************充赠奖励政策**********************************/	
	/**
	* 充赠奖励政策       
	**/
	public String getpChongZc(){
		
		if(this.pChongZc!=null){
			return this.pChongZc;
		}
		
		return this.pChongZc;
	}
	/**
	* 获取充赠奖励政策格式化(toString)
	**/
	public String getpChongZc$(){
		String strValue="";
	
	
		 strValue=Utils.string(this.getpChongZc());
	 
	 	 return strValue;
	}
	/**
	* 根据充赠奖励政策反格式化
	**/
	public void setpChongZc$(String strValue){
		if(Utils.empty(strValue)){
			this.pChongZc=null;
			return;
		}
	
	
		this.pChongZc=strValue;
	 
	}
	
	/**
	* 充赠奖励政策       
	**/
	public void setpChongZc(String pChongZc){
		this.pChongZc = pChongZc;
		
		this.setSeted(F.pChongZc);
		
	}
	
	
	
	
	
	
	
	
	
	
 	
 	
	
	
	
	
	
 	
 	
 	
	
	
	/*******************************转发标题**********************************/	
	/**
	* 转发标题 [非空]      
	**/
	public String getZfBt(){
		
		if(this.zfBt!=null){
			return this.zfBt;
		}
		
		return this.zfBt;
	}
	/**
	* 获取转发标题格式化(toString)
	**/
	public String getZfBt$(){
		String strValue="";
	
	
		 strValue=Utils.string(this.getZfBt());
	 
	 	 return strValue;
	}
	/**
	* 根据转发标题反格式化
	**/
	public void setZfBt$(String strValue){
		if(Utils.empty(strValue)){
			this.zfBt=null;
			return;
		}
	
	
	 	this.zfBt=strValue;
	 
	}
	
	/**
	* 转发标题 [非空]      
	**/
	public void setZfBt(String zfBt){
		this.zfBt = zfBt;
		
		this.setSeted(F.zfBt);
		
	}
	
	
	
	
	
	
	
	
	
	
 	
 	
	
	
	
	
	
 	
 	
 	
	
	
	/*******************************转发封面**********************************/	
	/**
	* 转发封面 [非空]      
	**/
	public String getZfFm(){
		
		if(this.zfFm!=null){
			return this.zfFm;
		}
		
		return this.zfFm;
	}
	/**
	* 获取转发封面格式化(toString)
	**/
	public String getZfFm$(){
		String strValue="";
	
	
		 strValue=Utils.string(this.getZfFm());
	 
	 	 return strValue;
	}
	/**
	* 根据转发封面反格式化
	**/
	public void setZfFm$(String strValue){
		if(Utils.empty(strValue)){
			this.zfFm=null;
			return;
		}
	
	
		this.zfFm=Utils.parseString(strValue);
	 
	}
	
	/**
	* 转发封面 [非空]      
	**/
	public void setZfFm(String zfFm){
		this.zfFm = zfFm;
		
		this.setSeted(F.zfFm);
		
	}
	
	
	
	
	
	
	
	
	
	
 	
 	
	
	
	
	
	
 	
 	
 	
	
	
	/*******************************领红包页图片**********************************/	
	/**
	* 领红包页图片 [非空]    领红包页图片  
	**/
	public String getLqHbImg(){
		
		if(this.lqHbImg!=null){
			return this.lqHbImg;
		}
		
		return this.lqHbImg;
	}
	/**
	* 获取领红包页图片格式化(toString)
	**/
	public String getLqHbImg$(){
		String strValue="";
	
	
		 strValue=Utils.string(this.getLqHbImg());
	 
	 	 return strValue;
	}
	/**
	* 根据领红包页图片反格式化
	**/
	public void setLqHbImg$(String strValue){
		if(Utils.empty(strValue)){
			this.lqHbImg=null;
			return;
		}
	
	
		this.lqHbImg=Utils.parseString(strValue);
	 
	}
	
	/**
	* 领红包页图片 [非空]    领红包页图片  
	**/
	public void setLqHbImg(String lqHbImg){
		this.lqHbImg = lqHbImg;
		
		this.setSeted(F.lqHbImg);
		
	}
	
	
	
	
	
	
	
	
	
	
 	
 	
	
	
	
	
	
 	
 	
 	
	
	
	/*******************************有奖邀请图片**********************************/	
	/**
	* 有奖邀请图片 [非空]    首页底部有奖邀请页图片  
	**/
	public String getYjYqImg(){
		
		if(this.yjYqImg!=null){
			return this.yjYqImg;
		}
		
		return this.yjYqImg;
	}
	/**
	* 获取有奖邀请图片格式化(toString)
	**/
	public String getYjYqImg$(){
		String strValue="";
	
	
		 strValue=Utils.string(this.getYjYqImg());
	 
	 	 return strValue;
	}
	/**
	* 根据有奖邀请图片反格式化
	**/
	public void setYjYqImg$(String strValue){
		if(Utils.empty(strValue)){
			this.yjYqImg=null;
			return;
		}
	
	
		this.yjYqImg=Utils.parseString(strValue);
	 
	}
	
	/**
	* 有奖邀请图片 [非空]    首页底部有奖邀请页图片  
	**/
	public void setYjYqImg(String yjYqImg){
		this.yjYqImg = yjYqImg;
		
		this.setSeted(F.yjYqImg);
		
	}
	
	
	
	
	
	
	
	
	
	
 	
 	
	
	
	
	
	
 	
 	
 	
	
	
	/*******************************红包有效期**********************************/	
	/**
	* 红包有效期 [非空]    为正整数，已小时为单位  1代表1小时后红包过期  
	**/
	public Integer getValidity(){
		
		if(this.validity!=null){
			return this.validity;
		}
		
		return this.validity;
	}
	/**
	* 获取红包有效期格式化(toString)
	**/
	public String getValidity$(){
		String strValue="";
	
	
		 strValue=Utils.string(this.getValidity());
	 
	 	 return strValue;
	}
	/**
	* 根据红包有效期反格式化
	**/
	public void setValidity$(String strValue){
		if(Utils.empty(strValue)){
			this.validity=null;
			return;
		}
	
	
	 	this.validity=Utils.parseInteger(strValue);
	 
	}
	
	/**
	* 红包有效期 [非空]    为正整数，已小时为单位  1代表1小时后红包过期  
	**/
	public void setValidity(Integer validity){
		this.validity = validity;
		
		this.setSeted(F.validity);
		
	}
	
	
	
	
	
	
	
	
	
	
 	
 	
	
	
	
	
	
 	
 	
 	
	
	
	/*******************************红包分享标题**********************************/	
	/**
	* 红包分享标题 [非空]      
	**/
	public String getRedTitle(){
		
		if(this.redTitle!=null){
			return this.redTitle;
		}
		
		return this.redTitle;
	}
	/**
	* 获取红包分享标题格式化(toString)
	**/
	public String getRedTitle$(){
		String strValue="";
	
	
		 strValue=Utils.string(this.getRedTitle());
	 
	 	 return strValue;
	}
	/**
	* 根据红包分享标题反格式化
	**/
	public void setRedTitle$(String strValue){
		if(Utils.empty(strValue)){
			this.redTitle=null;
			return;
		}
	
	
	 	this.redTitle=strValue;
	 
	}
	
	/**
	* 红包分享标题 [非空]      
	**/
	public void setRedTitle(String redTitle){
		this.redTitle = redTitle;
		
		this.setSeted(F.redTitle);
		
	}
	
	
	
	
	
	
	
	
	
	
 	
 	
	
	
	
	
	
 	
 	
 	
	
	
	/*******************************红包分享图**********************************/	
	/**
	* 红包分享图 [非空]      
	**/
	public String getRedImg(){
		
		if(this.redImg!=null){
			return this.redImg;
		}
		
		return this.redImg;
	}
	/**
	* 获取红包分享图格式化(toString)
	**/
	public String getRedImg$(){
		String strValue="";
	
	
		 strValue=Utils.string(this.getRedImg());
	 
	 	 return strValue;
	}
	/**
	* 根据红包分享图反格式化
	**/
	public void setRedImg$(String strValue){
		if(Utils.empty(strValue)){
			this.redImg=null;
			return;
		}
	
	
		this.redImg=Utils.parseString(strValue);
	 
	}
	
	/**
	* 红包分享图 [非空]      
	**/
	public void setRedImg(String redImg){
		this.redImg = redImg;
		
		this.setSeted(F.redImg);
		
	}
	
	
	
	
	
	
	
	
	
	
 	
 	
	
	
	
	
	
 	
 	
 	
	
	
	/*******************************满减配送费**********************************/	
	/**
	* 满减配送费 [非空]      
	**/
	public Double getFullFee(){
		
		if(this.fullFee!=null){
			return this.fullFee;
		}
		
		return this.fullFee;
	}
	/**
	* 获取满减配送费格式化(toString)
	**/
	public String getFullFee$(){
		String strValue="";
	
	
			
		 strValue=Utils.string(this.getFullFee());	
			
	 
	 	 return strValue;
	}
	/**
	* 根据满减配送费反格式化
	**/
	public void setFullFee$(String strValue){
		if(Utils.empty(strValue)){
			this.fullFee=null;
			return;
		}
	
	
	 	this.fullFee=Utils.parseDouble(strValue);
	 
	}
	
	/**
	* 满减配送费 [非空]      
	**/
	public void setFullFee(Double fullFee){
		this.fullFee = fullFee;
		
		this.setSeted(F.fullFee);
		
	}
	
	
	
	
	
	
	
	
	
	
 	
 	
	
	
	
	
	
 	
 	
 	
	
	
	/*******************************首页轮播图**********************************/	
	/**
	* 首页轮播图 [非空]    建议最多上传3张图  
	**/
	public String getHomeRotary(){
		
		if(this.homeRotary!=null){
			return this.homeRotary;
		}
		
		return this.homeRotary;
	}
	/**
	* 获取首页轮播图格式化(toString)
	**/
	public String getHomeRotary$(){
		String strValue="";
	
	
		 strValue=Utils.string(this.getHomeRotary());
	 
	 	 return strValue;
	}
	/**
	* 根据首页轮播图反格式化
	**/
	public void setHomeRotary$(String strValue){
		if(Utils.empty(strValue)){
			this.homeRotary=null;
			return;
		}
	
	
		this.homeRotary=Utils.parseString(strValue);
	 
	}
	
	/**
	* 首页轮播图 [非空]    建议最多上传3张图  
	**/
	public void setHomeRotary(String homeRotary){
		this.homeRotary = homeRotary;
		
		this.setSeted(F.homeRotary);
		
	}
	
	
	
	
	
	
	
	
	
	
 	
 	
	
	
	
	
	
 	
 	
 	
	
	
	/*******************************优品列表轮播图**********************************/	
	/**
	* 优品列表轮播图 [非空]    建议最多上传3张图  
	**/
	public String getListMap(){
		
		if(this.listMap!=null){
			return this.listMap;
		}
		
		return this.listMap;
	}
	/**
	* 获取优品列表轮播图格式化(toString)
	**/
	public String getListMap$(){
		String strValue="";
	
	
		 strValue=Utils.string(this.getListMap());
	 
	 	 return strValue;
	}
	/**
	* 根据优品列表轮播图反格式化
	**/
	public void setListMap$(String strValue){
		if(Utils.empty(strValue)){
			this.listMap=null;
			return;
		}
	
	
		this.listMap=Utils.parseString(strValue);
	 
	}
	
	/**
	* 优品列表轮播图 [非空]    建议最多上传3张图  
	**/
	public void setListMap(String listMap){
		this.listMap = listMap;
		
		this.setSeted(F.listMap);
		
	}
	
	
	
	
	
	
	
	
	
	
 	
 	
	
	
	
	
	
 	
 	
 	
	
	
	/*******************************代理申请图片**********************************/	
	/**
	* 代理申请图片 [非空]      
	**/
	public String getAgentTopImg(){
		
		if(this.agentTopImg!=null){
			return this.agentTopImg;
		}
		
		return this.agentTopImg;
	}
	/**
	* 获取代理申请图片格式化(toString)
	**/
	public String getAgentTopImg$(){
		String strValue="";
	
	
		 strValue=Utils.string(this.getAgentTopImg());
	 
	 	 return strValue;
	}
	/**
	* 根据代理申请图片反格式化
	**/
	public void setAgentTopImg$(String strValue){
		if(Utils.empty(strValue)){
			this.agentTopImg=null;
			return;
		}
	
	
		this.agentTopImg=Utils.parseString(strValue);
	 
	}
	
	/**
	* 代理申请图片 [非空]      
	**/
	public void setAgentTopImg(String agentTopImg){
		this.agentTopImg = agentTopImg;
		
		this.setSeted(F.agentTopImg);
		
	}
	
	
	
	
	
	
	
	
	
	
 	
 	
	
	
	
	
	
 	
 	
 	
	
	
	/*******************************推广海报**********************************/	
	/**
	* 推广海报 [非空]      
	**/
	public String getHb(){
		
		if(this.hb!=null){
			return this.hb;
		}
		
		return this.hb;
	}
	/**
	* 获取推广海报格式化(toString)
	**/
	public String getHb$(){
		String strValue="";
	
	
		 strValue=Utils.string(this.getHb());
	 
	 	 return strValue;
	}
	/**
	* 根据推广海报反格式化
	**/
	public void setHb$(String strValue){
		if(Utils.empty(strValue)){
			this.hb=null;
			return;
		}
	
	
		this.hb=Utils.parseString(strValue);
	 
	}
	
	/**
	* 推广海报 [非空]      
	**/
	public void setHb(String hb){
		this.hb = hb;
		
		this.setSeted(F.hb);
		
	}
	
	
	
	
	
	
	
	
	
	
 	
 	
	
	
	
	
	
 	
 	
 	
	
	
	/*******************************修改时间**********************************/	
	/**
	* 修改时间 [非空]      
	**/
	public Date getUpdateTime(){
		
		if(this.updateTime!=null){
			return this.updateTime;
		}
		
		return this.updateTime;
	}
	/**
	* 获取修改时间格式化(toString)
	**/
	public String getUpdateTime$(){
		String strValue="";
	
	
	 	
		 strValue=Utils.string(Utils.date(this.getUpdateTime(),"yyyy-MM-dd HH:mm:ss"));
		
	 
	 	 return strValue;
	}
	/**
	* 根据修改时间反格式化
	**/
	public void setUpdateTime$(String strValue){
		if(Utils.empty(strValue)){
			this.updateTime=null;
			return;
		}
	
	
	 	this.updateTime=Utils.date(strValue,"yyyy-MM-dd HH:mm:ss");
	 
	}
	
	/**
	* 修改时间 [非空]      
	**/
	public void setUpdateTime(Date updateTime){
		this.updateTime = updateTime;
		
		this.setSeted(F.updateTime);
		
	}
	
	
	
	
	
	
	
	
	
	
 	
 	
	
	
	
	
	
 	
 	
 	
	
	
	/*******************************添加时间**********************************/	
	/**
	* 添加时间 [非空]      
	**/
	public Date getAddTime(){
		
		if(this.addTime!=null){
			return this.addTime;
		}
		
		return this.addTime;
	}
	/**
	* 获取添加时间格式化(toString)
	**/
	public String getAddTime$(){
		String strValue="";
	
	
	 	
		 strValue=Utils.string(Utils.date(this.getAddTime(),"yyyy-MM-dd HH:mm:ss"));
		
	 
	 	 return strValue;
	}
	/**
	* 根据添加时间反格式化
	**/
	public void setAddTime$(String strValue){
		if(Utils.empty(strValue)){
			this.addTime=null;
			return;
		}
	
	
	 	this.addTime=Utils.date(strValue,"yyyy-MM-dd HH:mm:ss");
	 
	}
	
	/**
	* 添加时间 [非空]      
	**/
	public void setAddTime(Date addTime){
		this.addTime = addTime;
		
		this.setSeted(F.addTime);
		
	}
	
	
	
	
	
	
	
	
	
	
 	
 	
	
	
	
	
	
 	
 	
 	
	
	
	/*******************************状态**********************************/	
	/**
	* 状态 [非空]   1:正常 0:无效    
	**/
	public Short getStatus(){
		
		if(this.status!=null){
			return this.status;
		}
		
		return this.status;
	}
	/**
	* 获取状态格式化(toString)
	**/
	public String getStatus$(){
		String strValue="";
	
	
		
			
		 if(Utils.equals(Utils.string(this.getStatus()),"1"))
			strValue=Utils.string("正常");		 
			
		 if(Utils.equals(Utils.string(this.getStatus()),"0"))
			strValue=Utils.string("无效");		 
			
		
	 
	 	 return strValue;
	}
	/**
	* 根据状态反格式化
	**/
	public void setStatus$(String strValue){
		if(Utils.empty(strValue)){
			this.status=null;
			return;
		}
	
	
		
			
		 if(Utils.equals(strValue,"正常"))
		 	this.status=Utils.parseShort("1");
			
		 if(Utils.equals(strValue,"无效"))
		 	this.status=Utils.parseShort("0");
			
		
	 
	}
	
	/**
	* 状态 [非空]   1:正常 0:无效    
	**/
	public void setStatus(Short status){
		this.status = status;
		
		this.setSeted(F.status);
		
	}
	
	
	
	
	
	
	
	
	
	
 	
 	
	
	
	
	
	
 	
 	
 	
	
	
	
	/************LAZY3Q_DEFINE_CODE************/
	/************LAZY3Q_DEFINE_CODE************/	
	
	
	/**
	 * 触发器
	 */
	public static void on(Trigger.Index index,final Notify.Listener listener,Trigger.Type... types){
		Notify.on(Parameter.class, index, listener, types);
	}
	public static void on(final Notify.Listener listener,String type){
		Notify.on(Parameter.class, listener, type);
	}
	/**
	 * 当修改字段时
	 * @param filedName
	 * @param listener
	 */
	public static void on(String filedName,final Notify.Listener listener){
		Notify.on(Parameter.class, listener, filedName);
	}
	/**
	 * 当修改字段为某值时
	 * @param filedName
	 * @param value
	 * @param listener
	 */
	public static void on(String filedName,Object value,final Notify.Listener listener){
		if(value==null)return;
		Notify.on(Parameter.class, listener, filedName+"."+Utils.md5(""+value));
	}
	public void notify(String type){
		Trigger.on(Parameter.class,type, this);
	}
	
	
	/**
	 * 用来获取当有字段关联对象时的获取方式,调用如${Parameter.obj.filedName}
	 * 因为有些变态的模板语言不能识别$，所以不能以${Parameter.$filedName}获取关联对象
	 */
	public Map getObj(){
		return new HashMap(){
			@Override
			public Object get(Object key) {
				try {
					return Parameter.class.getMethod("get$"+Utils.forMat(key.toString())).invoke(Parameter.this);
				} catch (Exception e) {
					e.printStackTrace();
				}
				return null;
			}
		};
	}
	/**
	 * 用来获取某字段格式化的获取方式,调用如${Parameter.fmt.filedName}
	 * 因为有些变态的模板语言不能识别$，所以不能以${Parameter.filedName$}获取某字段格式化
	 */
	public Map getFmt(){
		return new HashMap(){
			@Override
			public Object get(Object key) {
				try {
					return Parameter.class.getMethod("get"+Utils.ForMat(key.toString()+"$")).invoke(Parameter.this);
				} catch (Exception e) {
					e.printStackTrace();
				}
				return null;
			}
		};
	}
	/**
	 * 获取查询参数链式串
	 * @return
	 */
	public static @Deprecated M where(){ return new M(0); }
	public static @Deprecated M m(){ return new M(0); }
	public static M where = new M(0,true);
	public static @database(DatabaseNames.distribute_sys) class M extends IbatisMap{
		int type = 0; 
		M linked = null;
		Boolean proxy = false;
		public M set = null;
		public M(int type){
			this.type = type;
			if(this.type==0){
				set = new M(1,true);
				set.linked = this;
			}
		};
		public M(int type,Boolean proxy){
			this.type = type;
			this.proxy=proxy;
		};
		public M proxy(){
			M m = new M(this.type);//当前的对像
			if(this.type==0){
				m.set = new M(1,true);//set对象
				m.set.linked = m;
			}else{
				m.linked=this.linked;
				this.linked.linked=m;
			}
			return m;
		}
		public @Deprecated M set(){			
			M m = this;
			m.linked=new M(1);
			m.linked.linked=m;
			return m.linked;
		};
		
		public M on(IbatisMap value,C column,String joinColumn){if(proxy)return proxy().on(value,column,joinColumn);this.put(value.getClass().getDeclaringClass().getSimpleName(), value);value.put("on", column.toString());value.put("to", joinColumn);return this;};
		
		
			
		
		/** 编号 [非空]       **/
		public M id(Object id){if(proxy)return proxy().id(id);  this.put("id", id);return this;};
	 	/** and id is null */
 		public M idNull(){if(proxy)return proxy().idNull();if(this.get("idNot")==null)this.put("idNot", "");this.put("id", null);return this;};
 		/** not .... */
 		public M idNot(){if(proxy)return proxy().idNot();this.put("idNot", "not");return this;};
 		public M idNotNull(){if(proxy)return proxy().idNotNull();this.put("idNot", "not");this.put("id", null);return this;};
 		public M idNot(Object id){if(proxy)return proxy().idNot(id);this.put("idNot", "not");this.put("id", id);return this;};
	 		
		/** and id <= ? */
		public M idMin(Object min){if(proxy)return proxy().idMin(min);this.put("idMin", min);return this;};
		/** and id >= ? */
		public M idMax(Object max){if(proxy)return proxy().idMax(max);this.put("idMax", max);return this;};
			
			
		public M idIn(String ids){
			if(proxy)return proxy().idIn(ids);  this.put("idIn", ids);return this;
		};	
 			
		
			
	 	
			
		public M merchant$on(Merchant.M value){if(proxy)return proxy().merchant$on(value);this.put("Merchant", value);value.put("on", "merchant");return this;};
 				
 			
		
		/** 所属品牌 [非空] [Merchant]      **/
		public M merchant(Object merchant){if(proxy)return proxy().merchant(merchant);  this.put("merchant", merchant);return this;};
	 	/** and merchant is null */
 		public M merchantNull(){if(proxy)return proxy().merchantNull();if(this.get("merchantNot")==null)this.put("merchantNot", "");this.put("merchant", null);return this;};
 		/** not .... */
 		public M merchantNot(){if(proxy)return proxy().merchantNot();this.put("merchantNot", "not");return this;};
 		public M merchantNotNull(){if(proxy)return proxy().merchantNotNull();this.put("merchantNot", "not");this.put("merchant", null);return this;};
 		public M merchantNot(Object merchant){if(proxy)return proxy().merchantNot(merchant);this.put("merchantNot", "not");this.put("merchant", merchant);return this;};
	 		
			
		public M merchantIn(String ids){
			if(proxy)return proxy().merchantIn(ids);  this.put("merchantIn", ids);return this;
		};	
 			
		
			
	 	
			
		
		/** 普通间接佣金 [非空]    佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.   **/
		public M pPtJj(Object pPtJj){if(proxy)return proxy().pPtJj(pPtJj);  this.put("pPtJj", pPtJj);return this;};
	 	/** and p_pt_jj is null */
 		public M pPtJjNull(){if(proxy)return proxy().pPtJjNull();if(this.get("pPtJjNot")==null)this.put("pPtJjNot", "");this.put("pPtJj", null);return this;};
 		/** not .... */
 		public M pPtJjNot(){if(proxy)return proxy().pPtJjNot();this.put("pPtJjNot", "not");return this;};
 		public M pPtJjNotNull(){if(proxy)return proxy().pPtJjNotNull();this.put("pPtJjNot", "not");this.put("pPtJj", null);return this;};
 		public M pPtJjNot(Object pPtJj){if(proxy)return proxy().pPtJjNot(pPtJj);this.put("pPtJjNot", "not");this.put("pPtJj", pPtJj);return this;};
	 		
		/** and p_pt_jj <= ? */
		public M pPtJjMin(Object min){if(proxy)return proxy().pPtJjMin(min);this.put("pPtJjMin", min);return this;};
		/** and p_pt_jj >= ? */
		public M pPtJjMax(Object max){if(proxy)return proxy().pPtJjMax(max);this.put("pPtJjMax", max);return this;};
			
			
		
			
	 	
			
		
		/** 普通直接佣金 [非空]    佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.   **/
		public M pPtZj(Object pPtZj){if(proxy)return proxy().pPtZj(pPtZj);  this.put("pPtZj", pPtZj);return this;};
	 	/** and p_pt_zj is null */
 		public M pPtZjNull(){if(proxy)return proxy().pPtZjNull();if(this.get("pPtZjNot")==null)this.put("pPtZjNot", "");this.put("pPtZj", null);return this;};
 		/** not .... */
 		public M pPtZjNot(){if(proxy)return proxy().pPtZjNot();this.put("pPtZjNot", "not");return this;};
 		public M pPtZjNotNull(){if(proxy)return proxy().pPtZjNotNull();this.put("pPtZjNot", "not");this.put("pPtZj", null);return this;};
 		public M pPtZjNot(Object pPtZj){if(proxy)return proxy().pPtZjNot(pPtZj);this.put("pPtZjNot", "not");this.put("pPtZj", pPtZj);return this;};
	 		
		/** and p_pt_zj <= ? */
		public M pPtZjMin(Object min){if(proxy)return proxy().pPtZjMin(min);this.put("pPtZjMin", min);return this;};
		/** and p_pt_zj >= ? */
		public M pPtZjMax(Object max){if(proxy)return proxy().pPtZjMax(max);this.put("pPtZjMax", max);return this;};
			
			
		
			
	 	
			
		
		/** 代理间接佣金 [非空]    佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.   **/
		public M pDlJj(Object pDlJj){if(proxy)return proxy().pDlJj(pDlJj);  this.put("pDlJj", pDlJj);return this;};
	 	/** and p_dl_jj is null */
 		public M pDlJjNull(){if(proxy)return proxy().pDlJjNull();if(this.get("pDlJjNot")==null)this.put("pDlJjNot", "");this.put("pDlJj", null);return this;};
 		/** not .... */
 		public M pDlJjNot(){if(proxy)return proxy().pDlJjNot();this.put("pDlJjNot", "not");return this;};
 		public M pDlJjNotNull(){if(proxy)return proxy().pDlJjNotNull();this.put("pDlJjNot", "not");this.put("pDlJj", null);return this;};
 		public M pDlJjNot(Object pDlJj){if(proxy)return proxy().pDlJjNot(pDlJj);this.put("pDlJjNot", "not");this.put("pDlJj", pDlJj);return this;};
	 		
		/** and p_dl_jj <= ? */
		public M pDlJjMin(Object min){if(proxy)return proxy().pDlJjMin(min);this.put("pDlJjMin", min);return this;};
		/** and p_dl_jj >= ? */
		public M pDlJjMax(Object max){if(proxy)return proxy().pDlJjMax(max);this.put("pDlJjMax", max);return this;};
			
			
		
			
	 	
			
		
		/** 代理直接佣金 [非空]    佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.   **/
		public M pDlZj(Object pDlZj){if(proxy)return proxy().pDlZj(pDlZj);  this.put("pDlZj", pDlZj);return this;};
	 	/** and p_dl_zj is null */
 		public M pDlZjNull(){if(proxy)return proxy().pDlZjNull();if(this.get("pDlZjNot")==null)this.put("pDlZjNot", "");this.put("pDlZj", null);return this;};
 		/** not .... */
 		public M pDlZjNot(){if(proxy)return proxy().pDlZjNot();this.put("pDlZjNot", "not");return this;};
 		public M pDlZjNotNull(){if(proxy)return proxy().pDlZjNotNull();this.put("pDlZjNot", "not");this.put("pDlZj", null);return this;};
 		public M pDlZjNot(Object pDlZj){if(proxy)return proxy().pDlZjNot(pDlZj);this.put("pDlZjNot", "not");this.put("pDlZj", pDlZj);return this;};
	 		
		/** and p_dl_zj <= ? */
		public M pDlZjMin(Object min){if(proxy)return proxy().pDlZjMin(min);this.put("pDlZjMin", min);return this;};
		/** and p_dl_zj >= ? */
		public M pDlZjMax(Object max){if(proxy)return proxy().pDlZjMax(max);this.put("pDlZjMax", max);return this;};
			
			
		
			
	 	
			
		
		/** 配送商佣金 [非空]    佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.   **/
		public M pPsYj(Object pPsYj){if(proxy)return proxy().pPsYj(pPsYj);  this.put("pPsYj", pPsYj);return this;};
	 	/** and p_ps_yj is null */
 		public M pPsYjNull(){if(proxy)return proxy().pPsYjNull();if(this.get("pPsYjNot")==null)this.put("pPsYjNot", "");this.put("pPsYj", null);return this;};
 		/** not .... */
 		public M pPsYjNot(){if(proxy)return proxy().pPsYjNot();this.put("pPsYjNot", "not");return this;};
 		public M pPsYjNotNull(){if(proxy)return proxy().pPsYjNotNull();this.put("pPsYjNot", "not");this.put("pPsYj", null);return this;};
 		public M pPsYjNot(Object pPsYj){if(proxy)return proxy().pPsYjNot(pPsYj);this.put("pPsYjNot", "not");this.put("pPsYj", pPsYj);return this;};
	 		
		/** and p_ps_yj <= ? */
		public M pPsYjMin(Object min){if(proxy)return proxy().pPsYjMin(min);this.put("pPsYjMin", min);return this;};
		/** and p_ps_yj >= ? */
		public M pPsYjMax(Object max){if(proxy)return proxy().pPsYjMax(max);this.put("pPsYjMax", max);return this;};
			
			
		
			
	 	
			
		
		/** 合伙人佣金 [非空]    佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.   **/
		public M pHhrYj(Object pHhrYj){if(proxy)return proxy().pHhrYj(pHhrYj);  this.put("pHhrYj", pHhrYj);return this;};
	 	/** and p_hhr_yj is null */
 		public M pHhrYjNull(){if(proxy)return proxy().pHhrYjNull();if(this.get("pHhrYjNot")==null)this.put("pHhrYjNot", "");this.put("pHhrYj", null);return this;};
 		/** not .... */
 		public M pHhrYjNot(){if(proxy)return proxy().pHhrYjNot();this.put("pHhrYjNot", "not");return this;};
 		public M pHhrYjNotNull(){if(proxy)return proxy().pHhrYjNotNull();this.put("pHhrYjNot", "not");this.put("pHhrYj", null);return this;};
 		public M pHhrYjNot(Object pHhrYj){if(proxy)return proxy().pHhrYjNot(pHhrYj);this.put("pHhrYjNot", "not");this.put("pHhrYj", pHhrYj);return this;};
	 		
		/** and p_hhr_yj <= ? */
		public M pHhrYjMin(Object min){if(proxy)return proxy().pHhrYjMin(min);this.put("pHhrYjMin", min);return this;};
		/** and p_hhr_yj >= ? */
		public M pHhrYjMax(Object max){if(proxy)return proxy().pHhrYjMax(max);this.put("pHhrYjMax", max);return this;};
			
			
		
			
	 	
			
		
		/** 经销商佣金 [非空]    佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.   **/
		public M pJxshYj(Object pJxshYj){if(proxy)return proxy().pJxshYj(pJxshYj);  this.put("pJxshYj", pJxshYj);return this;};
	 	/** and p_jxsh_yj is null */
 		public M pJxshYjNull(){if(proxy)return proxy().pJxshYjNull();if(this.get("pJxshYjNot")==null)this.put("pJxshYjNot", "");this.put("pJxshYj", null);return this;};
 		/** not .... */
 		public M pJxshYjNot(){if(proxy)return proxy().pJxshYjNot();this.put("pJxshYjNot", "not");return this;};
 		public M pJxshYjNotNull(){if(proxy)return proxy().pJxshYjNotNull();this.put("pJxshYjNot", "not");this.put("pJxshYj", null);return this;};
 		public M pJxshYjNot(Object pJxshYj){if(proxy)return proxy().pJxshYjNot(pJxshYj);this.put("pJxshYjNot", "not");this.put("pJxshYj", pJxshYj);return this;};
	 		
		/** and p_jxsh_yj <= ? */
		public M pJxshYjMin(Object min){if(proxy)return proxy().pJxshYjMin(min);this.put("pJxshYjMin", min);return this;};
		/** and p_jxsh_yj >= ? */
		public M pJxshYjMax(Object max){if(proxy)return proxy().pJxshYjMax(max);this.put("pJxshYjMax", max);return this;};
			
			
		
			
	 	
			
		
		/** 配送商服务条款 [非空]       **/
		public M psTk(Object psTk){if(proxy)return proxy().psTk(psTk);  this.put("psTk", psTk);return this;};
	 	/** and ps_tk is null */
 		public M psTkNull(){if(proxy)return proxy().psTkNull();if(this.get("psTkNot")==null)this.put("psTkNot", "");this.put("psTk", null);return this;};
 		/** not .... */
 		public M psTkNot(){if(proxy)return proxy().psTkNot();this.put("psTkNot", "not");return this;};
 		public M psTkNotNull(){if(proxy)return proxy().psTkNotNull();this.put("psTkNot", "not");this.put("psTk", null);return this;};
 		public M psTkNot(Object psTk){if(proxy)return proxy().psTkNot(psTk);this.put("psTkNot", "not");this.put("psTk", psTk);return this;};
	 		
			
		
			
	 	
			
		
		/** 收益条款 [非空]       **/
		public M syTk(Object syTk){if(proxy)return proxy().syTk(syTk);  this.put("syTk", syTk);return this;};
	 	/** and sy_tk is null */
 		public M syTkNull(){if(proxy)return proxy().syTkNull();if(this.get("syTkNot")==null)this.put("syTkNot", "");this.put("syTk", null);return this;};
 		/** not .... */
 		public M syTkNot(){if(proxy)return proxy().syTkNot();this.put("syTkNot", "not");return this;};
 		public M syTkNotNull(){if(proxy)return proxy().syTkNotNull();this.put("syTkNot", "not");this.put("syTk", null);return this;};
 		public M syTkNot(Object syTk){if(proxy)return proxy().syTkNot(syTk);this.put("syTkNot", "not");this.put("syTk", syTk);return this;};
	 		
			
		
			
	 	
			
		
		/** 充赠奖励政策        **/
		public M pChongZc(Object pChongZc){if(proxy)return proxy().pChongZc(pChongZc);  this.put("pChongZc", pChongZc);return this;};
	 	/** and p_chong_zc is null */
 		public M pChongZcNull(){if(proxy)return proxy().pChongZcNull();if(this.get("pChongZcNot")==null)this.put("pChongZcNot", "");this.put("pChongZc", null);return this;};
 		/** not .... */
 		public M pChongZcNot(){if(proxy)return proxy().pChongZcNot();this.put("pChongZcNot", "not");return this;};
 		public M pChongZcNotNull(){if(proxy)return proxy().pChongZcNotNull();this.put("pChongZcNot", "not");this.put("pChongZc", null);return this;};
 		public M pChongZcNot(Object pChongZc){if(proxy)return proxy().pChongZcNot(pChongZc);this.put("pChongZcNot", "not");this.put("pChongZc", pChongZc);return this;};
	 		
			
		
			
	 	
			
		
		/** 转发标题 [非空]       **/
		public M zfBt(Object zfBt){if(proxy)return proxy().zfBt(zfBt);  this.put("zfBt", zfBt);return this;};
	 	/** and zf_bt is null */
 		public M zfBtNull(){if(proxy)return proxy().zfBtNull();if(this.get("zfBtNot")==null)this.put("zfBtNot", "");this.put("zfBt", null);return this;};
 		/** not .... */
 		public M zfBtNot(){if(proxy)return proxy().zfBtNot();this.put("zfBtNot", "not");return this;};
 		public M zfBtNotNull(){if(proxy)return proxy().zfBtNotNull();this.put("zfBtNot", "not");this.put("zfBt", null);return this;};
 		public M zfBtNot(Object zfBt){if(proxy)return proxy().zfBtNot(zfBt);this.put("zfBtNot", "not");this.put("zfBt", zfBt);return this;};
	 		
			
		
			
	 	
			
		
		/** 转发封面 [非空]       **/
		public M zfFm(Object zfFm){if(proxy)return proxy().zfFm(zfFm);  this.put("zfFm", zfFm);return this;};
	 	/** and zf_fm is null */
 		public M zfFmNull(){if(proxy)return proxy().zfFmNull();if(this.get("zfFmNot")==null)this.put("zfFmNot", "");this.put("zfFm", null);return this;};
 		/** not .... */
 		public M zfFmNot(){if(proxy)return proxy().zfFmNot();this.put("zfFmNot", "not");return this;};
 		public M zfFmNotNull(){if(proxy)return proxy().zfFmNotNull();this.put("zfFmNot", "not");this.put("zfFm", null);return this;};
 		public M zfFmNot(Object zfFm){if(proxy)return proxy().zfFmNot(zfFm);this.put("zfFmNot", "not");this.put("zfFm", zfFm);return this;};
	 		
			
		
			
	 	
			
		
		/** 领红包页图片 [非空]    领红包页图片   **/
		public M lqHbImg(Object lqHbImg){if(proxy)return proxy().lqHbImg(lqHbImg);  this.put("lqHbImg", lqHbImg);return this;};
	 	/** and lq_hb_img is null */
 		public M lqHbImgNull(){if(proxy)return proxy().lqHbImgNull();if(this.get("lqHbImgNot")==null)this.put("lqHbImgNot", "");this.put("lqHbImg", null);return this;};
 		/** not .... */
 		public M lqHbImgNot(){if(proxy)return proxy().lqHbImgNot();this.put("lqHbImgNot", "not");return this;};
 		public M lqHbImgNotNull(){if(proxy)return proxy().lqHbImgNotNull();this.put("lqHbImgNot", "not");this.put("lqHbImg", null);return this;};
 		public M lqHbImgNot(Object lqHbImg){if(proxy)return proxy().lqHbImgNot(lqHbImg);this.put("lqHbImgNot", "not");this.put("lqHbImg", lqHbImg);return this;};
	 		
			
		
			
	 	
			
		
		/** 有奖邀请图片 [非空]    首页底部有奖邀请页图片   **/
		public M yjYqImg(Object yjYqImg){if(proxy)return proxy().yjYqImg(yjYqImg);  this.put("yjYqImg", yjYqImg);return this;};
	 	/** and yj_yq_img is null */
 		public M yjYqImgNull(){if(proxy)return proxy().yjYqImgNull();if(this.get("yjYqImgNot")==null)this.put("yjYqImgNot", "");this.put("yjYqImg", null);return this;};
 		/** not .... */
 		public M yjYqImgNot(){if(proxy)return proxy().yjYqImgNot();this.put("yjYqImgNot", "not");return this;};
 		public M yjYqImgNotNull(){if(proxy)return proxy().yjYqImgNotNull();this.put("yjYqImgNot", "not");this.put("yjYqImg", null);return this;};
 		public M yjYqImgNot(Object yjYqImg){if(proxy)return proxy().yjYqImgNot(yjYqImg);this.put("yjYqImgNot", "not");this.put("yjYqImg", yjYqImg);return this;};
	 		
			
		
			
	 	
			
		
		/** 红包有效期 [非空]    为正整数，已小时为单位  1代表1小时后红包过期   **/
		public M validity(Object validity){if(proxy)return proxy().validity(validity);  this.put("validity", validity);return this;};
	 	/** and validity is null */
 		public M validityNull(){if(proxy)return proxy().validityNull();if(this.get("validityNot")==null)this.put("validityNot", "");this.put("validity", null);return this;};
 		/** not .... */
 		public M validityNot(){if(proxy)return proxy().validityNot();this.put("validityNot", "not");return this;};
 		public M validityNotNull(){if(proxy)return proxy().validityNotNull();this.put("validityNot", "not");this.put("validity", null);return this;};
 		public M validityNot(Object validity){if(proxy)return proxy().validityNot(validity);this.put("validityNot", "not");this.put("validity", validity);return this;};
	 		
		/** and validity <= ? */
		public M validityMin(Object min){if(proxy)return proxy().validityMin(min);this.put("validityMin", min);return this;};
		/** and validity >= ? */
		public M validityMax(Object max){if(proxy)return proxy().validityMax(max);this.put("validityMax", max);return this;};
			
			
		public M validityIn(String ids){
			if(proxy)return proxy().validityIn(ids);  this.put("validityIn", ids);return this;
		};	
 			
		
			
	 	
			
		
		/** 红包分享标题 [非空]       **/
		public M redTitle(Object redTitle){if(proxy)return proxy().redTitle(redTitle);  this.put("redTitle", redTitle);return this;};
	 	/** and red_title is null */
 		public M redTitleNull(){if(proxy)return proxy().redTitleNull();if(this.get("redTitleNot")==null)this.put("redTitleNot", "");this.put("redTitle", null);return this;};
 		/** not .... */
 		public M redTitleNot(){if(proxy)return proxy().redTitleNot();this.put("redTitleNot", "not");return this;};
 		public M redTitleNotNull(){if(proxy)return proxy().redTitleNotNull();this.put("redTitleNot", "not");this.put("redTitle", null);return this;};
 		public M redTitleNot(Object redTitle){if(proxy)return proxy().redTitleNot(redTitle);this.put("redTitleNot", "not");this.put("redTitle", redTitle);return this;};
	 		
			
		
			
	 	
			
		
		/** 红包分享图 [非空]       **/
		public M redImg(Object redImg){if(proxy)return proxy().redImg(redImg);  this.put("redImg", redImg);return this;};
	 	/** and red_img is null */
 		public M redImgNull(){if(proxy)return proxy().redImgNull();if(this.get("redImgNot")==null)this.put("redImgNot", "");this.put("redImg", null);return this;};
 		/** not .... */
 		public M redImgNot(){if(proxy)return proxy().redImgNot();this.put("redImgNot", "not");return this;};
 		public M redImgNotNull(){if(proxy)return proxy().redImgNotNull();this.put("redImgNot", "not");this.put("redImg", null);return this;};
 		public M redImgNot(Object redImg){if(proxy)return proxy().redImgNot(redImg);this.put("redImgNot", "not");this.put("redImg", redImg);return this;};
	 		
			
		
			
	 	
			
		
		/** 满减配送费 [非空]       **/
		public M fullFee(Object fullFee){if(proxy)return proxy().fullFee(fullFee);  this.put("fullFee", fullFee);return this;};
	 	/** and full_fee is null */
 		public M fullFeeNull(){if(proxy)return proxy().fullFeeNull();if(this.get("fullFeeNot")==null)this.put("fullFeeNot", "");this.put("fullFee", null);return this;};
 		/** not .... */
 		public M fullFeeNot(){if(proxy)return proxy().fullFeeNot();this.put("fullFeeNot", "not");return this;};
 		public M fullFeeNotNull(){if(proxy)return proxy().fullFeeNotNull();this.put("fullFeeNot", "not");this.put("fullFee", null);return this;};
 		public M fullFeeNot(Object fullFee){if(proxy)return proxy().fullFeeNot(fullFee);this.put("fullFeeNot", "not");this.put("fullFee", fullFee);return this;};
	 		
		/** and full_fee <= ? */
		public M fullFeeMin(Object min){if(proxy)return proxy().fullFeeMin(min);this.put("fullFeeMin", min);return this;};
		/** and full_fee >= ? */
		public M fullFeeMax(Object max){if(proxy)return proxy().fullFeeMax(max);this.put("fullFeeMax", max);return this;};
			
			
		
			
	 	
			
		
		/** 首页轮播图 [非空]    建议最多上传3张图   **/
		public M homeRotary(Object homeRotary){if(proxy)return proxy().homeRotary(homeRotary);  this.put("homeRotary", homeRotary);return this;};
	 	/** and home_rotary is null */
 		public M homeRotaryNull(){if(proxy)return proxy().homeRotaryNull();if(this.get("homeRotaryNot")==null)this.put("homeRotaryNot", "");this.put("homeRotary", null);return this;};
 		/** not .... */
 		public M homeRotaryNot(){if(proxy)return proxy().homeRotaryNot();this.put("homeRotaryNot", "not");return this;};
 		public M homeRotaryNotNull(){if(proxy)return proxy().homeRotaryNotNull();this.put("homeRotaryNot", "not");this.put("homeRotary", null);return this;};
 		public M homeRotaryNot(Object homeRotary){if(proxy)return proxy().homeRotaryNot(homeRotary);this.put("homeRotaryNot", "not");this.put("homeRotary", homeRotary);return this;};
	 		
			
		
			
	 	
			
		
		/** 优品列表轮播图 [非空]    建议最多上传3张图   **/
		public M listMap(Object listMap){if(proxy)return proxy().listMap(listMap);  this.put("listMap", listMap);return this;};
	 	/** and list_map is null */
 		public M listMapNull(){if(proxy)return proxy().listMapNull();if(this.get("listMapNot")==null)this.put("listMapNot", "");this.put("listMap", null);return this;};
 		/** not .... */
 		public M listMapNot(){if(proxy)return proxy().listMapNot();this.put("listMapNot", "not");return this;};
 		public M listMapNotNull(){if(proxy)return proxy().listMapNotNull();this.put("listMapNot", "not");this.put("listMap", null);return this;};
 		public M listMapNot(Object listMap){if(proxy)return proxy().listMapNot(listMap);this.put("listMapNot", "not");this.put("listMap", listMap);return this;};
	 		
			
		
			
	 	
			
		
		/** 代理申请图片 [非空]       **/
		public M agentTopImg(Object agentTopImg){if(proxy)return proxy().agentTopImg(agentTopImg);  this.put("agentTopImg", agentTopImg);return this;};
	 	/** and agent_top_img is null */
 		public M agentTopImgNull(){if(proxy)return proxy().agentTopImgNull();if(this.get("agentTopImgNot")==null)this.put("agentTopImgNot", "");this.put("agentTopImg", null);return this;};
 		/** not .... */
 		public M agentTopImgNot(){if(proxy)return proxy().agentTopImgNot();this.put("agentTopImgNot", "not");return this;};
 		public M agentTopImgNotNull(){if(proxy)return proxy().agentTopImgNotNull();this.put("agentTopImgNot", "not");this.put("agentTopImg", null);return this;};
 		public M agentTopImgNot(Object agentTopImg){if(proxy)return proxy().agentTopImgNot(agentTopImg);this.put("agentTopImgNot", "not");this.put("agentTopImg", agentTopImg);return this;};
	 		
			
		
			
	 	
			
		
		/** 推广海报 [非空]       **/
		public M hb(Object hb){if(proxy)return proxy().hb(hb);  this.put("hb", hb);return this;};
	 	/** and hb is null */
 		public M hbNull(){if(proxy)return proxy().hbNull();if(this.get("hbNot")==null)this.put("hbNot", "");this.put("hb", null);return this;};
 		/** not .... */
 		public M hbNot(){if(proxy)return proxy().hbNot();this.put("hbNot", "not");return this;};
 		public M hbNotNull(){if(proxy)return proxy().hbNotNull();this.put("hbNot", "not");this.put("hb", null);return this;};
 		public M hbNot(Object hb){if(proxy)return proxy().hbNot(hb);this.put("hbNot", "not");this.put("hb", hb);return this;};
	 		
			
		
			
	 	
			
		
		/** 修改时间 [非空]       **/
		public M updateTime(Object updateTime){if(proxy)return proxy().updateTime(updateTime);  this.put("updateTime", updateTime);return this;};
	 	/** and update_time is null */
 		public M updateTimeNull(){if(proxy)return proxy().updateTimeNull();if(this.get("updateTimeNot")==null)this.put("updateTimeNot", "");this.put("updateTime", null);return this;};
 		/** not .... */
 		public M updateTimeNot(){if(proxy)return proxy().updateTimeNot();this.put("updateTimeNot", "not");return this;};
 		public M updateTimeNotNull(){if(proxy)return proxy().updateTimeNotNull();this.put("updateTimeNot", "not");this.put("updateTime", null);return this;};
 		public M updateTimeNot(Object updateTime){if(proxy)return proxy().updateTimeNot(updateTime);this.put("updateTimeNot", "not");this.put("updateTime", updateTime);return this;};
	 		
 		/** and update_time >= ? */
 		public M updateTimeStart(Object start){if(proxy)return proxy().updateTimeStart(start);this.put("updateTimeStart", start);return this;};			
 		/** and update_time <= ? */
 		public M updateTimeEnd(Object end){if(proxy)return proxy().updateTimeEnd(end);this.put("updateTimeEnd", end);return this;};
			
			
		
			
	 	
			
		
		/** 添加时间 [非空]       **/
		public M addTime(Object addTime){if(proxy)return proxy().addTime(addTime);  this.put("addTime", addTime);return this;};
	 	/** and add_time is null */
 		public M addTimeNull(){if(proxy)return proxy().addTimeNull();if(this.get("addTimeNot")==null)this.put("addTimeNot", "");this.put("addTime", null);return this;};
 		/** not .... */
 		public M addTimeNot(){if(proxy)return proxy().addTimeNot();this.put("addTimeNot", "not");return this;};
 		public M addTimeNotNull(){if(proxy)return proxy().addTimeNotNull();this.put("addTimeNot", "not");this.put("addTime", null);return this;};
 		public M addTimeNot(Object addTime){if(proxy)return proxy().addTimeNot(addTime);this.put("addTimeNot", "not");this.put("addTime", addTime);return this;};
	 		
 		/** and add_time >= ? */
 		public M addTimeStart(Object start){if(proxy)return proxy().addTimeStart(start);this.put("addTimeStart", start);return this;};			
 		/** and add_time <= ? */
 		public M addTimeEnd(Object end){if(proxy)return proxy().addTimeEnd(end);this.put("addTimeEnd", end);return this;};
			
			
		
			
	 	
			
		
		/** 状态 [非空]   1:正常 0:无效     **/
		public M status(Object status){if(proxy)return proxy().status(status);  this.put("status", status);return this;};
	 	/** and status is null */
 		public M statusNull(){if(proxy)return proxy().statusNull();if(this.get("statusNot")==null)this.put("statusNot", "");this.put("status", null);return this;};
 		/** not .... */
 		public M statusNot(){if(proxy)return proxy().statusNot();this.put("statusNot", "not");return this;};
 		public M statusNotNull(){if(proxy)return proxy().statusNotNull();this.put("statusNot", "not");this.put("status", null);return this;};
 		public M statusNot(Object status){if(proxy)return proxy().statusNot(status);this.put("statusNot", "not");this.put("status", status);return this;};
	 		
			
		public M statusIn(String ids){
			if(proxy)return proxy().statusIn(ids);  this.put("statusIn", ids);return this;
		};	
 			
		
			
	 	
	 	public M add(String key, Object value) {if(proxy)return proxy().add(key,value);this.put(key, value);return this;}
	 	public M add(F key, Object value) {if(proxy)return proxy().add(key,value);this.put(key.toString(), value);return this;}
	 	
	 	public M desc(C key) {if(proxy)return proxy().desc(key);this.put("desc", key.column);return this;}
	 	public M asc(C key) {if(proxy)return proxy().asc(key);this.put("asc", key.column);return this;}
	 	public M desc(String sql) {if(proxy)return proxy().desc(sql);this.put("desc", sql);return this;}
	 	public M asc(String sql) {if(proxy)return proxy().asc(sql);this.put("asc", sql);return this;}
	 	public M definex(String sql) {if(proxy)return proxy().definex(sql);this.put("definex", sql);return this;}
	 	
	 	/** 获取所有业务参数 **/
		public @api List<Parameter> list(Integer size){			
			return getParameterList(this,size);
		}
		/** 获取业务参数分页 **/
		public @api Page<Parameter> page(Integer page,Integer size){			
			return getParameterPage(page, size , this);
		}
		/** 根据查询条件取业务参数 **/
		public @api Parameter get(){			
			return getParameter(this);
		}
		/** 获取业务参数数 **/
		public @api Long count(){			
			return getParameterCount(this);
		}
		/** 获取业务参数表达式 **/
		public @api <T> T eval(String strEval){			
			return getParameterEval(strEval,this);
		}
		
		/** 获取业务参数统计 **/
		public @api List<Map> stats(C sumKey,C groupKey,int dateType){			
			return getParameterStats(this,sumKey,groupKey,dateType);
		}
		/** 获取业务参数统计 **/
		public @api List<Map> stats(C sumKey,C groupKey){			
			return getParameterStats(this,sumKey,groupKey,-1);
		}
		
		/** 根据条件更新 **/
		public @api int update(){			
			M where = null;
			M set = null;
			if(this.type==0){
				if(this.linked==null)throw new RuntimeException("未发set");
				where = this;
				set = this.linked;
			}else{
				if(this.linked==null)throw new RuntimeException("未发where条件");
				set = this;
				where = this.linked;
			}
			return updateParameter(set,where);
		}
		/** 根据条件删除 **/
		public @api void delete(){			
			deleteParameter(this);
		}
	}
	
	public static class Param extends M{
		public Param(int type) {
			super(type);
		}
		public Param(int type, Boolean proxy) {
			super(type, proxy);
		}
	}
	
	/** 对象的字段描述 **/
	public static class F{
		
			
		/** 编号 [非空]       **/
		public final static @type(Long.class)  String id="id";
	 			
			
	 	
			
		/** 所属品牌 [非空] [Merchant]      **/
		public final static @type(Long.class)  String merchant="merchant";
	 			
			
	 	
			
		/** 普通间接佣金 [非空]    佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.   **/
		public final static @type(Double.class)  String pPtJj="pPtJj";
	 			
		/** and p_pt_jj >= ? */
		public final static @type(Double.class) String pPtJjMin="pPtJjMin";
		/** and p_pt_jj <= ? */
		public final static @type(Double.class) String pPtJjMax="pPtJjMax";
				
			
	 	
			
		/** 普通直接佣金 [非空]    佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.   **/
		public final static @type(Double.class)  String pPtZj="pPtZj";
	 			
		/** and p_pt_zj >= ? */
		public final static @type(Double.class) String pPtZjMin="pPtZjMin";
		/** and p_pt_zj <= ? */
		public final static @type(Double.class) String pPtZjMax="pPtZjMax";
				
			
	 	
			
		/** 代理间接佣金 [非空]    佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.   **/
		public final static @type(Double.class)  String pDlJj="pDlJj";
	 			
		/** and p_dl_jj >= ? */
		public final static @type(Double.class) String pDlJjMin="pDlJjMin";
		/** and p_dl_jj <= ? */
		public final static @type(Double.class) String pDlJjMax="pDlJjMax";
				
			
	 	
			
		/** 代理直接佣金 [非空]    佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.   **/
		public final static @type(Double.class)  String pDlZj="pDlZj";
	 			
		/** and p_dl_zj >= ? */
		public final static @type(Double.class) String pDlZjMin="pDlZjMin";
		/** and p_dl_zj <= ? */
		public final static @type(Double.class) String pDlZjMax="pDlZjMax";
				
			
	 	
			
		/** 配送商佣金 [非空]    佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.   **/
		public final static @type(Double.class)  String pPsYj="pPsYj";
	 			
		/** and p_ps_yj >= ? */
		public final static @type(Double.class) String pPsYjMin="pPsYjMin";
		/** and p_ps_yj <= ? */
		public final static @type(Double.class) String pPsYjMax="pPsYjMax";
				
			
	 	
			
		/** 合伙人佣金 [非空]    佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.   **/
		public final static @type(Double.class)  String pHhrYj="pHhrYj";
	 			
		/** and p_hhr_yj >= ? */
		public final static @type(Double.class) String pHhrYjMin="pHhrYjMin";
		/** and p_hhr_yj <= ? */
		public final static @type(Double.class) String pHhrYjMax="pHhrYjMax";
				
			
	 	
			
		/** 经销商佣金 [非空]    佣金为百分比，1为百分之百，0.1为百分之十,0.01为百分之一，不能是0.001～9,也不能大于等于1.   **/
		public final static @type(Double.class)  String pJxshYj="pJxshYj";
	 			
		/** and p_jxsh_yj >= ? */
		public final static @type(Double.class) String pJxshYjMin="pJxshYjMin";
		/** and p_jxsh_yj <= ? */
		public final static @type(Double.class) String pJxshYjMax="pJxshYjMax";
				
			
	 	
			
		/** 配送商服务条款 [非空]       **/
		public final static @type(String.class) @like String psTk="psTk";
	 			
			
	 	
			
		/** 收益条款 [非空]       **/
		public final static @type(String.class) @like String syTk="syTk";
	 			
			
	 	
			
		/** 充赠奖励政策        **/
		public final static @type(String.class) @like String pChongZc="pChongZc";
	 			
			
	 	
			
		/** 转发标题 [非空]       **/
		public final static @type(String.class)  String zfBt="zfBt";
	 			
			
	 	
			
		/** 转发封面 [非空]       **/
		public final static @type(String.class)  String zfFm="zfFm";
	 			
			
	 	
			
		/** 领红包页图片 [非空]    领红包页图片   **/
		public final static @type(String.class)  String lqHbImg="lqHbImg";
	 			
			
	 	
			
		/** 有奖邀请图片 [非空]    首页底部有奖邀请页图片   **/
		public final static @type(String.class)  String yjYqImg="yjYqImg";
	 			
			
	 	
			
		/** 红包有效期 [非空]    为正整数，已小时为单位  1代表1小时后红包过期   **/
		public final static @type(Integer.class)  String validity="validity";
	 			
		/** and validity >= ? */
		public final static @type(Integer.class) String validityMin="validityMin";
		/** and validity <= ? */
		public final static @type(Integer.class) String validityMax="validityMax";
				
			
	 	
			
		/** 红包分享标题 [非空]       **/
		public final static @type(String.class) @like String redTitle="redTitle";
	 			
			
	 	
			
		/** 红包分享图 [非空]       **/
		public final static @type(String.class) @like String redImg="redImg";
	 			
			
	 	
			
		/** 满减配送费 [非空]       **/
		public final static @type(Double.class)  String fullFee="fullFee";
	 			
		/** and full_fee >= ? */
		public final static @type(Double.class) String fullFeeMin="fullFeeMin";
		/** and full_fee <= ? */
		public final static @type(Double.class) String fullFeeMax="fullFeeMax";
				
			
	 	
			
		/** 首页轮播图 [非空]    建议最多上传3张图   **/
		public final static @type(String.class) @like String homeRotary="homeRotary";
	 			
			
	 	
			
		/** 优品列表轮播图 [非空]    建议最多上传3张图   **/
		public final static @type(String.class) @like String listMap="listMap";
	 			
			
	 	
			
		/** 代理申请图片 [非空]       **/
		public final static @type(String.class)  String agentTopImg="agentTopImg";
	 			
			
	 	
			
		/** 推广海报 [非空]       **/
		public final static @type(String.class)  String hb="hb";
	 			
			
	 	
			
		/** 修改时间 [非空]       **/
		public final static @type(Date.class)  String updateTime="updateTime";
	 			
	 	/** and update_time >= ? */
 		public final static @type(Date.class) String updateTimeStart="updateTimeStart";
 		/** and update_time <= ? */
 		public final static @type(Date.class) String updateTimeEnd="updateTimeEnd";
				
			
	 	
			
		/** 添加时间 [非空]       **/
		public final static @type(Date.class)  String addTime="addTime";
	 			
	 	/** and add_time >= ? */
 		public final static @type(Date.class) String addTimeStart="addTimeStart";
 		/** and add_time <= ? */
 		public final static @type(Date.class) String addTimeEnd="addTimeEnd";
				
			
	 	
			
		/** 状态 [非空]   1:正常 0:无效     **/
		public final static @type(Short.class)  String status="status";
	 			
			
	 	
	 	public static String get(String name){
			try {
				Field field = F.class.getField(name);
				if(field!=null)
					return field.get(null).toString();
			} catch (Exception e) {
				//e.printStackTrace();
			}
			return null;
		}
	}
	
	
	
	/** 对象的数据库字段描述 **/
	public static enum C{
		
		id("id"),
		merchant("merchant"),
		pPtJj("p_pt_jj"),
		pPtZj("p_pt_zj"),
		pDlJj("p_dl_jj"),
		pDlZj("p_dl_zj"),
		pPsYj("p_ps_yj"),
		pHhrYj("p_hhr_yj"),
		pJxshYj("p_jxsh_yj"),
		psTk("ps_tk"),
		syTk("sy_tk"),
		pChongZc("p_chong_zc"),
		zfBt("zf_bt"),
		zfFm("zf_fm"),
		lqHbImg("lq_hb_img"),
		yjYqImg("yj_yq_img"),
		validity("validity"),
		redTitle("red_title"),
		redImg("red_img"),
		fullFee("full_fee"),
		homeRotary("home_rotary"),
		listMap("list_map"),
		agentTopImg("agent_top_img"),
		hb("hb"),
		updateTime("update_time"),
		addTime("add_time"),
		status("status"),
		count("count");
		String column;
		C(String column){
			this.column = column;
		}
		public String toString(){
			return this.column;
		}
		public static String get(String name){
			try {
				Field field = C.class.getField(name);
				if(field!=null)
					return field.get(null).toString();
			} catch (Exception e) {
				//e.printStackTrace();
			}
			return null;
		}
	}
	
	
	
	
	/**
	* 获取业务参数数据
	**/
	public static Object getData(Object param){
		if(param==null)
			return null;
		Object value = null;
		if(param.getClass()==Long.class)
			value = Parameter.get((Long)param);
		else if(param instanceof java.util.Map){
			java.util.Map params = (Map) param;
			if(params.get("size")==null)
				value = Parameter.getParameter(params);
			else
				value = Parameter.getParameterList(params, (Integer) params.get("size"));
		}else if(param.getClass()==Long.class )
			value =  Parameter.where().id(param).get();
		else if(!Utils.empty(param.toString()))
			value = Parameter.get(Long.valueOf(param.toString()));
		return value;
	}
	
	/**对象转json**/
	public Map toJSON(){
		return toJSON(false);
	}
	public Map toJSON(boolean simple){
		Map map = new HashMap();
		map.put("id",this.getId());
	
		Utils.fms(map,simple?"":"id",this.getId(),this.getId$());
 		
	
		Utils.fms(map,simple?"":"merchant",this.getMerchant(),this.getMerchant$());
 		
	
		Utils.fms(map,simple?"ptJj":"pPtJj",this.getpPtJj(),this.getpPtJj$());
 		
	
		Utils.fms(map,simple?"ptZj":"pPtZj",this.getpPtZj(),this.getpPtZj$());
 		
	
		Utils.fms(map,simple?"dlJj":"pDlJj",this.getpDlJj(),this.getpDlJj$());
 		
	
		Utils.fms(map,simple?"dlZj":"pDlZj",this.getpDlZj(),this.getpDlZj$());
 		
	
		Utils.fms(map,simple?"psYj":"pPsYj",this.getpPsYj(),this.getpPsYj$());
 		
	
		Utils.fms(map,simple?"hhrYj":"pHhrYj",this.getpHhrYj(),this.getpHhrYj$());
 		
	
		Utils.fms(map,simple?"jxshYj":"pJxshYj",this.getpJxshYj(),this.getpJxshYj$());
 		
	
		Utils.fms(map,simple?"tk":"psTk",this.getPsTk(),this.getPsTk$());
 		
	
		Utils.fms(map,simple?"tk":"syTk",this.getSyTk(),this.getSyTk$());
 		
	
		Utils.fms(map,simple?"chongZc":"pChongZc",this.getpChongZc(),this.getpChongZc$());
 		
	
		Utils.fms(map,simple?"bt":"zfBt",this.getZfBt(),this.getZfBt$());
 		
	
		Utils.fms(map,simple?"fm":"zfFm",this.getZfFm(),this.getZfFm$());
 		
	
		Utils.fms(map,simple?"hbImg":"lqHbImg",this.getLqHbImg(),this.getLqHbImg$());
 		
	
		Utils.fms(map,simple?"yqImg":"yjYqImg",this.getYjYqImg(),this.getYjYqImg$());
 		
	
		Utils.fms(map,simple?"":"validity",this.getValidity(),this.getValidity$());
 		
	
		Utils.fms(map,simple?"title":"redTitle",this.getRedTitle(),this.getRedTitle$());
 		
	
		Utils.fms(map,simple?"img":"redImg",this.getRedImg(),this.getRedImg$());
 		
	
		Utils.fms(map,simple?"fee":"fullFee",this.getFullFee(),this.getFullFee$());
 		
	
		Utils.fms(map,simple?"rotary":"homeRotary",this.getHomeRotary(),this.getHomeRotary$());
 		
	
		Utils.fms(map,simple?"map":"listMap",this.getListMap(),this.getListMap$());
 		
	
		Utils.fms(map,simple?"topImg":"agentTopImg",this.getAgentTopImg(),this.getAgentTopImg$());
 		
	
		Utils.fms(map,simple?"":"hb",this.getHb(),this.getHb$());
 		
	
		Utils.fms(map,simple?"time":"updateTime",this.getUpdateTime(),this.getUpdateTime$());
 		
	
		Utils.fms(map,simple?"time":"addTime",this.getAddTime(),this.getAddTime$());
 		
	
		Utils.fms(map,simple?"":"status",this.getStatus(),this.getStatus$());
 		
	
		if(this.suffix!=null)map.put("suffix", this.suffix);
		
		/************LAZY3Q_DEFINE_TOJSON************/
		/************LAZY3Q_DEFINE_TOJSON************/
		return map;
	}
	/**对象转map**/
	public Map toMap(){
		Map map = new HashMap();
	
		map.put("id",this.getId());
 		
	
		map.put("merchant",this.getMerchant());
 		
	
		map.put("pPtJj",this.getpPtJj());
 		
	
		map.put("pPtZj",this.getpPtZj());
 		
	
		map.put("pDlJj",this.getpDlJj());
 		
	
		map.put("pDlZj",this.getpDlZj());
 		
	
		map.put("pPsYj",this.getpPsYj());
 		
	
		map.put("pHhrYj",this.getpHhrYj());
 		
	
		map.put("pJxshYj",this.getpJxshYj());
 		
	
		map.put("psTk",this.getPsTk());
 		
	
		map.put("syTk",this.getSyTk());
 		
	
		map.put("pChongZc",this.getpChongZc());
 		
	
		map.put("zfBt",this.getZfBt());
 		
	
		map.put("zfFm",this.getZfFm());
 		
	
		map.put("lqHbImg",this.getLqHbImg());
 		
	
		map.put("yjYqImg",this.getYjYqImg());
 		
	
		map.put("validity",this.getValidity());
 		
	
		map.put("redTitle",this.getRedTitle());
 		
	
		map.put("redImg",this.getRedImg());
 		
	
		map.put("fullFee",this.getFullFee());
 		
	
		map.put("homeRotary",this.getHomeRotary());
 		
	
		map.put("listMap",this.getListMap());
 		
	
		map.put("agentTopImg",this.getAgentTopImg());
 		
	
		map.put("hb",this.getHb());
 		
	
		map.put("updateTime",this.getUpdateTime());
 		
	
		map.put("addTime",this.getAddTime());
 		
	
		map.put("status",this.getStatus());
 		
	
		map.put("suffix", this.suffix);
		
		/************LAZY3Q_DEFINE_TOMAP************/
		/************LAZY3Q_DEFINE_TOMAP************/
		return map;
	}
	/**map转对象**/
	public static Parameter fromMap(Map map){
		Parameter parameter = new Parameter();
	
		parameter.id = Utils.parseLong(map.get("id"));
 		
	
		parameter.merchant = Utils.parseLong(map.get("merchant"));
 		
	
		parameter.pPtJj = Utils.parseDouble(map.get("pPtJj"));
 		
	
		parameter.pPtZj = Utils.parseDouble(map.get("pPtZj"));
 		
	
		parameter.pDlJj = Utils.parseDouble(map.get("pDlJj"));
 		
	
		parameter.pDlZj = Utils.parseDouble(map.get("pDlZj"));
 		
	
		parameter.pPsYj = Utils.parseDouble(map.get("pPsYj"));
 		
	
		parameter.pHhrYj = Utils.parseDouble(map.get("pHhrYj"));
 		
	
		parameter.pJxshYj = Utils.parseDouble(map.get("pJxshYj"));
 		
	
		parameter.psTk = Utils.parseString(map.get("psTk"));
 		
	
		parameter.syTk = Utils.parseString(map.get("syTk"));
 		
	
		parameter.pChongZc = Utils.parseString(map.get("pChongZc"));
 		
	
		parameter.zfBt = Utils.parseString(map.get("zfBt"));
 		
	
		parameter.zfFm = Utils.parseString(map.get("zfFm"));
 		
	
		parameter.lqHbImg = Utils.parseString(map.get("lqHbImg"));
 		
	
		parameter.yjYqImg = Utils.parseString(map.get("yjYqImg"));
 		
	
		parameter.validity = Utils.parseInteger(map.get("validity"));
 		
	
		parameter.redTitle = Utils.parseString(map.get("redTitle"));
 		
	
		parameter.redImg = Utils.parseString(map.get("redImg"));
 		
	
		parameter.fullFee = Utils.parseDouble(map.get("fullFee"));
 		
	
		parameter.homeRotary = Utils.parseString(map.get("homeRotary"));
 		
	
		parameter.listMap = Utils.parseString(map.get("listMap"));
 		
	
		parameter.agentTopImg = Utils.parseString(map.get("agentTopImg"));
 		
	
		parameter.hb = Utils.parseString(map.get("hb"));
 		
	
		parameter.updateTime = Utils.parseDate(map.get("updateTime"));
 		
	
		parameter.addTime = Utils.parseDate(map.get("addTime"));
 		
	
		parameter.status = Utils.parseShort(map.get("status"));
 		
	
		return parameter;
	}
	
	
	/**字段设置标记队列**/
	private Map<String,Boolean> seted=new HashMap();
	public Boolean getSeted(String key){
		return seted.get(key);
	}
	public void setSeted(String key){
		seted.put(key,true);
	}
	/**同步未set的字段**/
	public void mergeSet(Parameter old){
		Field[] fields = this.getClass().getDeclaredFields();
		try {
			for(Field field:fields){
				String key = field.getName();
				if(seted.get(key)==null && field.getAnnotation(column.class)!=null){
					field.setAccessible(true);
					field.set(this, field.get(old));					
				}
			}
		} catch (Exception e) {
			throw new RuntimeException(e);
		}
	}
	
		
	/**自定义变量存储**/
	private Map values=new HashMap();
	public Map getValues(){
		return values;
	}
	public void setValues(String name,Object value){
		values.put(name,value);
	}
	
	/**分表时的表名后缀**/
	private String suffix;
	public String getSuffix() {
		return suffix;
	}
	public void setSuffix(String suffix) {
		this.suffix = suffix;
	}
	
	
	/**获取数据库名称**/
	public static String getDataBaseName(){
		return Utils.config("spring.datasource.distribute_sys.name");
	}
	
	
	public static String getIcon(){
		return "/images/icons/1789726240.png";
	}
	public static String getIconfont(){
		return "icon-jihua";
	}
	public static enum ACT{
		列表,添加,修改,详情
	};
	public static String getUrl(ACT act,Parameter.M params){
		if(params==null)params=new Parameter.M(0);
		params.remove("joins");
		params.remove("definexs");
		params.remove("distinct");
		String strUrl = "/admin/setting/setting.edit.html?";
		if(params.get("id")!=null){
			strUrl+="&id="+Utils.encode(""+params.get("id"),Utils.UTF8);
		}
		if(act==ACT.列表){
			strUrl = "/admin/setting/setting.html?1=1";
		
		}else if(act==ACT.添加){
			strUrl+="&edittype=insert";
		
		
		}else if(act==ACT.修改){
			strUrl+="&edittype=update";
		
		}else if(act==ACT.详情){
			strUrl+="&edittype=detail";
		
		}		
		if(params!=null){
			for(Object key:params.keySet()){
				strUrl+="&"+key+"="+Utils.encode(""+params.get(key),Utils.UTF8)+"";
			}
		}
		return strUrl;
	}
	public String getDetailUrl(){
		return this.getUrl(ACT.详情, where.id(this.getId()));
	}
	
	/**
	* 转跳到当前地址
	**/
	public static Protocol redirect(Parameter.ACT act,Parameter.M params){
		Protocol protocol = Protocol.create(true,null,"ACT_REDIRECT");
		protocol.set("url",Parameter.getUrl(act, params));
		return protocol;
	}
	/**
	* 打开一个新的tab页面
	**/
	public static Protocol href(Parameter.ACT act,Parameter.M params){
		Protocol protocol = Protocol.create(true,null,"ACT_HREF");
		protocol.set("url",Parameter.getUrl(act, params));
		protocol.set("title",act.name());
		return protocol;
	}
	/**
	* 显示一个消息框，并且关闭当前的对话框
	**/
	public static Protocol message(String message){
		Protocol protocol = Protocol.create(true,null,"ACT_MESSAGE");
		protocol.set("message",message);
		return protocol;
	}
	
	
	static com.distribute.framework.dao.IParameterDao getParameterDao(){
		return Utils.getBean("parameterDao");
	};
	
}